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:-----
2
24
68
246
81012
141618
2468
10121416
18202224
26283032

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

Starter code:

Solutions:
# 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*2,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*2)
            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 = 2
    for j in range(1,l[i]+1):
        for k in range(1,l[i]+1):
            print(z,end='')
            z += 2
        print()


for _ in range(int(input())):
	n = int(input())
	count = 2
	for i in range(n):
		for j in range(n):
			print(count, end="")
			count += 2
		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*2,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*2,end="")
            s+=1
        print()
            


from sys import*
input=stdin.readline
t=int(input())
for _ in range(t):
    k=int(input())
    x=2
    for i in range(k):
        for j in range(k):
            print(x,end="")
            x+=2
        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+=2
                print(s,end="")
            print("\r")
except Exception:
    pass


# cook your dish here
# 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=2
    for i in range(0,n,1):
        for j in range(0,n,1):
            print(c,end='')
            c+=2
        
        print()
        
    
for i in range(n):
    pat(l[i])
    
    
    
    

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(2*j,end="")
        print()
        

def solve(n):
    j=2
    for i in range(1,n+1):
        for k in range(n):
            print(j,end='')
            j+=2
        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
for _ in range(int(input())):
    k = int(input())
    x = 2
    for i in range(k):
        for j in range(k):
            print(x,end = '')
            x = x + 2
        print()

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

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

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

t = int(input())

for i in range(t):
    k = int(input()) 
    for j in range(0, k):
        print("".join([str(2*(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(2*(x+1)) for x in range(j*k, j*k + k)]))


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

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

    


# 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*2)
            count += 1
        print(s)
        s = ""

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

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*2,end="")
            count+=1
        print()


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