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

-----Sample Output:-----
1
12
34
123
456
789
1234
5678
9101112
13141516

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

Starter code:

Solutions:
# cook your dish here

t = int(input())

for _ in range(t):
    s = ''
    n = int(input())
    if n==1:
        print(1)
        continue
    for i in range(1, n+1):
        s = s + str(i)
    print(s)
    
    p = 1
    for i in range(n-1):
        s = ''
        for j in range(n):
            s = s + str(p + n)
            p = p+1
            
        print(s)
        


def P(h):
    number=1
    for i in range(1, h + 1):
        for j in range(1, h + 1):
            print(number, end = '')
            number = number + 1
        print()

for i in range(int(input())):
    a=int(input())
    P(a)
    

# cook your dish here
try:
    for _ in range(int(input())):
        k = int(input())
        num = 1
        for i in range(1,k+1,1):
            for j in range(1,k+1,1):
                print(num,end="")
                num = num +1
            print("")
except:
    pass

t = int(input())

for _ in range(t):
    k = int(input())
    count = 1
    for _ in range(k):
        output = ''
        for index in range(1,k+1):
            output += str(count)
            count += 1
        print(output)

n = int(input())
l = [0] * n
for x in range(n):
    l[x] = int(input())
for i in range(n):
    z = 1
    for j in range(1,l[i]+1):
        for k in range(1,l[i]+1):
            print(z,end='')
            z += 1
        print()


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

for i in range(int(input())):
    n= int(input())
    
    for j in range(0,n):
        s=""
        for k in range(1,n+1):
            s+=str(n*j+k)
        print(s)

from sys import*
input=stdin.readline
t=int(input())
for _ in range(t):
    k=int(input())
    x=1
    for i in range(k):
        for j in range(k):
            print(x,end="")
            x+=1
        print()


t=int(input())
for t in range(t):
    n=int(input())
    s=1
    for i in range(1,n+1):
        for j in range(1,n+1):
            print(s,end="")
            s+=1
        print()

t=int(input())
for t in range(t):
    n=int(input())
    s=1
    for i in range(1,n+1):
        for j in range(1,n+1):
            print(s,end="")
            s+=1
        print()

try:
    for i in range(int(input())):
        n=int(input())
        s=0
        for j in range(1,n+1):
            for k in range(1,n+1):
                s+=1
                print(s,end="")
            print("\r")
except Exception:
    pass


for _ in range(0,int(input())):
    a=int(input())
    for i in range(1,a**2+1,a):
        for j in range(i,a+i):
            print(j,end="")
        print()
        

def solve(n):
    j=1
    for i in range(1,n+1):
        for k in range(n):
            print(j,end='')
            j+=1
        print()
for _ in range(int(input())):
    n=int(input())
    #s=input()
    #a,b=map(int,input().split())
    #l=list(map(int,input().split()))
    solve(n)


# cook your dish here
# cook your dish here
n=int(input())
l=[]
for j in range(n):
    t=int(input())
    l.append(t)
    


def pat(n):
    c=1
    for i in range(0,n,1):
        for j in range(0,n,1):
            print(c,end='')
            c+=1
        print()
        
    
for i in range(n):
    pat(l[i])
    
    
    
    

# cook your dish here
for _ in range(int(input())):
    k = int(input())
    x = 1
    for i in range(k):
        for j in range(k):
            print(x,end = '')
            x = x + 1
        print()

t=int(input())
for i in range(0,t):
    n=int(input())
    p=1
    for j in range(0,n):
        for k in range(0,n):
            print(p,end="")
            p=p+1
        print(" ")

# cook your dish here
# cook your dish here
for case in range(int(input())):
    n=int(input())
    
    k=1
    for i in range(0,n):
        for j in range(0,n):
            print(k,end="")
            k+=1
        print("")
        


t = int(input())

for i in range(t):
    k = int(input()) # 4
    ini = [x for x in range(1, k + 1)]
    for j in range(0, k):
        print("".join([str(x+1) for x in range(j*k, j*k + k)]))


t = int(input())

for i in range(t):
    k = int(input()) # 4
    ini = [x for x in range(1, k + 1)]
    for j in range(0, k):
        print("".join([str(x+1) for x in range(j*k, j*k + k)]))

try:
    tc=int(input())
    for _ in range(tc):
        n=int(input())
        a=1
        for i in range(n):
            for j in range(n):
                print(a,end='')
                a+=1
            print()
except:
    pass

# cook your dish here
# cook your dish here
for case in range(int(input())):
    n=int(input())
    
    k=1
    for i in range(0,n):
        for j in range(0,n):
            print(k,end="")
            k+=1
        print("")
        

try:
    t=int(input())
    for _ in range(t):
        n = int(input())
        c=1
        for i in range(n):
            for j in range(n):
                print(c,end="")
                c+=1
            print()
except EOFError:
    pass

# cook your dish here
for _ in range(int(input())):
    k = int(input())
    s = ""
    count = 1
    for i in range(k):
        for j in range(k):
            s += str(count)
            count += 1
        print(s)
        s = ""

# cook your dish here
# cook your dish here
for _ in range(int(input())):
    n=int(input())
    if n==1:
        print("1")
    else:
        p=1
        for i in range(n):
            for j in range(n):
                print(p,end='')
                p+=1
            print()
                

# cook your dish here
for i in range(int(input())):
    k=int(input())
    count=1
    for j in range(1,k+1):
        for l in range(1,k+1):
            print(count,end="")
            count+=1
        print()