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
10
10
101
101
101
1010
1010
1010
1010

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

Difficulty: interview

Starter code:

Solutions:
for _ in range(int(input())):
	n = int(input())
	num = ""
	val = 1
	for i in range(n):
		num += str(val)
		if val == 1:
			val = 0
		else:
			val = 1
	for i in range(n):
		print(num)
		
	


for _ in range(int(input())):
	n = int(input())
	num = ""
	val = 1
	for i in range(n):
		num += str(val)
		if val == 1:
			val = 0
		else:
			val = 1
	for i in range(n):
		print(num)
		
	


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

for _ in range(int(input())):
	n = int(input())
	num = ""
	val = 1
	for i in range(n):
		num += str(val)
		if val == 1:
			val = 0
		else:
			val = 1
	for i in range(n):
		print(num)
		
	


t=int(input())
for t in range(t):
    n=int(input())
    for i in range(0,n):
        for j in range(0,n):
            if j%2==0:
                print(1,end="")
            else:
                print(0,end="")
        print()

# cook your dish here
for i in range(int(input())):
    k=int(input())
    m1=k
    c=1
    z=0
    count=0
    while(k>1):
        if(z%2==0):
            c=c*10
        else:
            c=c*10+1
        k-=1
        z+=1
    for j in range(m1):
        print(c)

t=int(input())
for t in range(t):
    n=int(input())
    for i in range(0,n):
        for j in range(0,n):
            if j%2==0:
                print(1,end="")
            else:
                print(0,end="")
        print()
            


from sys import*
input=stdin.readline
t=int(input())
for _ in range(t):
    k=int(input())
    l=[1 for _ in range(k)]
    for i in range(1,k):
        if l[i-1]==0:
            l[i]=1
        else:
            l[i]=0
    ans="".join([str(x) for x in l])
    for i in range(k):
        print(ans)


# cook your dish here
t=int(input())
for _ in range(t):
    n=int(input())
    s=""
    for i in range(1,n+1):
        if i%2!=0:
            s+='1'
        else:
            s+='0'
    for i in range(1,n+1):
        print(s)


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



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

def solve(n):
    for i in range(1,n+1):
        j=1
        for k in range(1,n+1):
            print(j,end='')
            if j==1:
                j=0
            else:
                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)


t = int(input())

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


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

t=int(input())
for i in range(0,t):
    n=int(input())
    for j in range(0,n):
        for k in range(0,n):
            if k%2==0:
                print(1,end="")
            else:
                print(0,end="")
        print(" ")
            

try:
    tc=int(input())
    for _ in range(tc):
        n=int(input())
        a=0
        st=""
        for i in range(n):
            if a%2==1:
                st+='0'
            else:
                st+='1'
            a+=1
        for j in range(n):
            print(st)
except:
    pass

# cook your dish here

# cook your dish here
t = int(input())

while t:
    n = int(input())


    for i in range(1, n + 1):
        for j in range(1, n + 1):
            if j % 2 == 1:
                print(1, end='')
            else:
                print(0, end='')
            
        print()
        
    t -= 1

# cook your dish here

# t = [input() for i in range(n)]


def fk(s: str):
    s = int(s)
    # for i in range(2, 1+1+int(s)):
    #     for k in range(i, i+s):
    #         print(k, end='')
    #     print()
    # t = 0
    # for i in range(1, s*s+1):
    #     print(i*2, end='')
    #     t += 1
    #     if t == s:
    #         print()
    #         t = 0
    res = ''
    ini = 1
    for i in range(s):
        res += str(ini)
        ini = 1-ini
    for i in range(s):
        print(res)


n = eval(input())
n = int(n)
t = [fk(eval(input())) for i in range(n)]

# fk(3)


try:
    def solve(n):
        res=""
        for i in range(n):
            if i%2==0:
                res+="1"
            else:
                res+="0"
        return res
    t=int(input())
    for _ in range(t):
        n = int(input())
        z=solve(n)
        for i in range(n):
            print(z)
       
except EOFError:
    pass

for _ in range(int(input())):
    n=int(input())
    if n==1:
        print("1")
    else:
        s=''
        for i in range(n):
            if i%2==0:
                s+='1'
            else:
                s+='0'
        for i in range(n):
            print(s)

# 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)
            if count == 1:
                count = 0
            else:
                count = 1
        print(s)
        s = ""
        count = 1

# cook your dish here


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