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:-----
0
01
10
010
101
010
0101
1010
0101
1010

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

Starter code:

Solutions:
t=int(input())
for t in range(t):
    n=int(input())
    for i in range(0,n):
        for j in range(0,n):
            if i%2==0:
                if j%2==0:
                    print(0,end="")
                else:
                    print(1,end="")
            else:
                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=[0 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])
    l1=[1 for _ in range(k)]
    for i in range(1,k):
        if l1[i-1]==1:
            l1[i]=0
        else:
            l1[i]=1
    ans1="".join([str(x) for x in l1])
    for i in range(k):
        if (i%2)==0:
            print(ans)
        else:
            print(ans1)


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


# 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'
    s1=''
    for i in range(1,n+1):
        if i%2==0:
            s1+='1'
        else:
            s1+='0'
    for i in range(1,n+1):
        if i%2==0:
            print(s)
        else:
            print(s1)

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

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

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

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

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

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


# 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
    ini = 0
    q = 1
    for i in range(1, s*s+1):
        print(ini, end='')
        ini = 1-ini
        t += 1
        if t == s:
            q += 1
            print()
            t = 0
            if q % 2 == 0:
                ini = 1
            else:
                ini = 0

    # res = ''
    # ini = 1
    # for i in range(s):
    #     res += str(ini)
    #     ini = 1-ini
    # for i in range(s):
    #     print(res)


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

# fk(5)


# 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 i % 2 == 1:
                if j % 2 == 1:
                    print(0, end='')
                else:
                    print(1, end='')
            else:
                if j % 2 == 1:
                    print(1, end='')
                else:
                    print(0, end='')
            
        print()
        
    t -= 1

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

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

# 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 (i+j)%2==0:
                print('0',end='')
            else:
                print('1',end="")
            # print(i+j,end="")
            # c+=2
        print()

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())
    for i in range(n):
        for j in range(n):
            print((i+j)%2, end="")
        print()

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