BETA

Difficulty Level: Basic

Submissions: 1691 Accuracy:

27.26%

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 Input/Output Examples Use 'Expected Output' option **

Contributor: Saksham Raj Seth

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

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