The chef is trying to decode 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:-----
4
1
2
3
4

-----Sample Output:-----
1
12
3
123
45
6
1234
567
89
10

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

Source: codechef | Difficulty: UNKNOWN_DIFFICULTY


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


t = int(input())
for i in range(t):
	n = int(input())
	if n == 1:
		print(1)
	else:
		count = 1
		while n > 0:
			for j in range(1, n + 1):
				print(count, end='')
				count += 1
			n -= 1
			print()


for _ in range(int(input())):
	n = int(input())
	t = n
	s = 0
	for i in range(n):
		for j in range(n - i):
			t -= 1
			s += 1
			print(s, end='')
		print('\r')


t = int(input())
for _ in range(t):
	n = int(input())
	k = n * (n + 1) / 2
	t = 1
	for i in range(n):
		for j in range(n - i):
			print(t, end='')
			t += 1
		print()


testcases = int(input())
for x in range(testcases):
	n = int(input())
	count = 1
	for x in range(n, 0, -1):
		for y in range(x, 0, -1):
			print(count, end='')
			count += 1
		print()


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


def func(num):
	count = 1
	for i in range(1, num + 1):
		for j in range(1, num + 2 - i):
			print(count, end='')
			count += 1
		print()
for _ in range(int(input())):
	num = int(input())
	func(num)


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


def solve(n):
	c = 1
	r = list(range(1, n + 1))
	r.sort(reverse=True)
	for i in r:
		x = ''
		for j in range(i):
			x += str(c)
			c += 1
		print(x)

def main():
	t = int(input())
	for i in range(t):
		n = int(input())
		solve(n)
main()


def f(n):
	line = n
	p = 1
	while line > 0:
		for i in range(line):
			print(p, end='')
			p += 1
		print()
		line -= 1
t = int(input())
answers = list()
for _ in range(t):
	n = int(input())
	answers.append(n)
for answer in answers:
	f(answer)


x = int(input())
for i in range(x):
	n = int(input())
	p = 1
	for j in range(n):
		for k in range(n - j):
			print(p, end='')
			p += 1
		print()


def solve():
	n = int(input())
	it = n
	k = 1
	for i in range(n):
		j = 0
		while j < it:
			print(k, end='')
			j += 1
			k += 1
		print('')
		it -= 1

def __starting_point():
	T = int(input())
	for i in range(T):
		solve()
__starting_point()


for _ in range(int(input())):
	N = int(input())
	K = 1
	for i in range(N, 0, -1):
		for j in range(i):
			print(K, end='')
			K += 1
		print()


import sys
input = lambda : sys.stdin.readline().rstrip('\r\n')
inp = lambda : list(map(int, sys.stdin.readline().rstrip('\r\n').split()))
tc = 1
(tc,) = inp()
for _ in range(tc):
	(n,) = inp()
	b = n * (n + 1) // 2
	a = [i + 1 for i in range(b + 1)]
	start = 0
	for i in range(n, 0, -1):
		print(*a[start:start + i], sep='')
		start += i


from sys import stdin, stdout
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log
from collections import defaultdict as dd, deque
from heapq import merge, heapify, heappop, heappush, nsmallest
from bisect import bisect_left as bl, bisect_right as br, bisect
mod = pow(10, 9) + 7
mod2 = 998244353

def inp():
	return stdin.readline().strip()

def out(var, end='\n'):
	stdout.write(str(var) + '\n')

def outa(*var, end='\n'):
	stdout.write(' '.join(map(str, var)) + end)

def lmp():
	return list(mp())

def mp():
	return map(int, inp().split())

def smp():
	return map(str, inp().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]

def remadd(x, y):
	return 1 if x % y else 0

def ceil(a, b):
	return (a + b - 1) // b

def isprime(x):
	if x <= 1:
		return False
	if x in (2, 3):
		return True
	if x % 2 == 0:
		return False
	for i in range(3, int(sqrt(x)) + 1, 2):
		if x % i == 0:
			return False
	return True
for _ in range(int(inp())):
	n = int(inp())
	k = 1
	for i in range(n):
		for j in range(n - i):
			print(k, end='')
			k += 1
		print()


for _ in range(int(input())):
	n = int(input())
	x = 1
	for _ in range(1, n + 1):
		for __ in range(n - _ + 1, 0, -1):
			print(x, end='')
			x += 1
		print()
	print()