T=int(input()) for i in range(T): N=int(input()) if N%4==0: print('1001'*(N//4)) elif N%4==3: print('110'+'1001'*(N//4)) else: print(-1)