text: #☆𝒐𝒎𝒂𝒋𝒊𝒏𝒂𝒊☆#
  import sys
  import math
  import itertools
  from functools import lru_cache
  from collections import deque
  sys.setrecursionlimit(10000000)
  input=lambda : sys.stdin.readline().rstrip()
  '''''✂'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  
  n=int(input())
  for i in range(n):
      x=int(input())
      print('1'*x+'0'*x+'1')
      input()
      input()
      input()