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.
# 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)

# 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)
