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:-----
3
2
3
4

-----Sample Output:-----
1121
1222
112131
122232
132333
11213141
12223242
13233343
14243444

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

Difficulty: UNKNOWN_DIFFICULTY

Solutions:
for _ in range(int(input().strip())):
	n = int(input().strip())
	lst = []
	for i in range(n):
		lst.append(i + 1)
		lst.append(1)
	for i in range(n):
		print(''.join((str(e) for e in lst)))
		for x in range(n):
			lst[x * 2 + 1] += 1


for _ in range(int(input())):
	k = int(input())
	for i in range(k):
		for j in range(k):
			print(j + 1, end='')
			print(i + 1, end='')
		print()


t = int(input())
for i in range(0, t):
	my_int = int(input().strip())
	for xyz in range(1, my_int + 1):
		for abc in range(1, my_int + 1):
			print('{0}{1}'.format(abc, xyz), end='')
		print()


for _ in range(int(input())):
	n = int(input())
	for i in range(1, n + 1):
		for j in range(1, n + 1):
			print(str(j) + str(i), end='')
		print()


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	a = []
	for i in range(n):
		a.append([str(i + 1)] * n)
		l = []
		for k in range(1, n + 1):
			l.append(str(k))
		a.append(l)
	ans = []
	for i in range(n):
		v = []
		for j in range(len(a)):
			v.append(a[j][i])
		ans.append(v)
	for ele in ans:
		print(''.join(ele))


for u in range(int(input().strip())):
	n = int(input().strip())
	for i in range(1, n + 1):
		for j in range(1, n + 1):
			print('{0}{1}'.format(j, i), end='')
		print()


t = int(input(''))
while t != 0:
	s = ''
	k = int(input(''))
	for i in range(k):
		for j in range(k):
			s = s + str(j + 1) + str(i + 1)
		print(s)
		s = ''
	t -= 1


T = int(input())
for t in range(T):
	N = int(input())
	for i in range(N):
		sol = '1'
		for j in range(2, N + 1):
			sol += str(i + 1) + str(j)
		print(sol + str(i + 1))


for tc in range(int(input())):
	K = int(input())
	for i in range(K):
		ar = [str(i + 1 if j % 2 else j + 2 >> 1) for j in range(2 * K)]
		print(''.join(ar))


n = int(input())
s = ''
for i in range(n):
	a = int(input())
	k = 1
	for j in range(1, a + 1):
		while k < a + 1:
			s = s + str(k) + str(j)
			k = k + 1
		print(s)
		s = ''
		k = 1


t = int(input())
for i in range(t):
	k = int(input())
	l = []
	for i in range(1, 101):
		l.append(i)
	arr = []
	x = 1
	for i in range(2 * 100):
		if i % 2 == 0:
			arr.append([x] * 100)
			x = x + 1
		else:
			arr.append(l)
	j = 0
	while j < k:
		i = 0
		while i < 2 * k:
			print(arr[i][j], end='')
			i = i + 1
		print()
		j = j + 1


t = int(input())
for _ in range(t):
	n = int(input())
	dp = [[0 for i in range(n * 2)] for i in range(n)]
	for i in range(2 * n):
		if i % 2:
			for j in range(n):
				dp[j][i] = j + 1
		else:
			for j in range(n):
				dp[j][i] = i // 2 + 1
	for i in range(n):
		x = ''.join(map(str, dp[i]))
		print(x)


for a0 in range(int(input())):
	n = int(input())
	for j in range(1, n + 1):
		s = ''
		for i in range(1, n + 1):
			s += str(i) + str(j)
		print(s)


try:
	t = int(input())
	for a in range(t):
		k = int(input())
		for i in range(1, k + 1):
			s = ''
			x = 1
			for j in range(1, 2 * k + 1):
				if j % 2 == 0:
					s += str(i)
				else:
					s += str(x)
					x += 1
			print(s)
except EOFError:
	pass


t = int(input())
for _ in range(t):
	n = int(input())
	for i in range(n):
		for j in range(2 * n):
			if j % 2 == 0:
				print(int(j / 2) + 1, end='')
			else:
				print(i + 1, end='')
		print()


t = int(input())
for i in range(t):
	k = int(input())
	for j in range(1, k + 1):
		for k in range(1, k + 1):
			print(f'{k}{j}', end='')
		print()