The chef is trying to solve some pattern problems, Chef wants your help to code it. Chef has one number K to form a new pattern. Help the chef to code this pattern problem.

-----Input:-----
- First-line will contain $T$, the number of test cases. Then the test cases follow. 
- Each test case contains a single line of input, one integer $K$. 

-----Output:-----
For each test case, output as the pattern.

-----Constraints-----
- $1 \leq T \leq 100$
- $1 \leq K \leq 100$

-----Sample Input:-----
2
2
4

-----Sample Output:-----
2
21
210
21
2
4
43
432
4321
43210
4321
432
43
4

-----EXPLANATION:-----
No need, else pattern can be decode easily.

Difficulty: UNKNOWN_DIFFICULTY

Solutions:
t = int(input())
while t:
	n = int(input())
	for i in range(n, -1, -1):
		for j in range(n, i - 1, -1):
			print(j, end='')
		print()
	for i in range(1, n + 1):
		for j in range(n, i - 1, -1):
			print(j, end='')
		print()
	t -= 1