BETA

Submissions : 1349 Accuracy :

26.91

Interesting Patterns
     

Given an integer N. Your task is to print the pattern.
For example:
Input N=4 
Output : 
4444444 
4333334 
4322234 
4321234 
4322234 
4333334 
4444444 

Input N=3 
Output : 
 33333 
 32223 
 32123 
 32223 
 33333
 
Input:
First line consists of test cases.For each test case only one line be the input containing an integer N.

Output:
For each test case. Print the pattern in single line by giving space instead of new line.

Constraints:
1<=T<=20
1<=N<=20

Example:
Input

1
4

Output
4444444 4333334 4322234 4321234 4322234 4333334 4444444

**For More Examples Use Expected Output**


Contributor: Saksham Raj Seth

Set Default Code

					   
Result:
It is recommended to test your code before clicking 'Submit' button!



                   



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.