for _ in range(int(input())): n = int(input()) print(-1 if 1<=n%4<=2 else"001"*(n%4>0)+"01"*(n//4)+"10"*(n//4))