for _ in range(T := int(input())): N = int(input()) if N%4 == 0: print(N//4*"0110") elif N%4 == 3: print(N//4*"0011" + "001") else: print(-1)