import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); for (int z = 0; z < t; z++) { int n = sc.nextInt(); int n2 = n * (n + 1) / 2; if (n2 % 2 == 1) { System.out.println(-1); continue; } char[] ans = new char[n]; Arrays.fill(ans, '0'); int goal = n2 / 2; int sum = 0; for (int i = n - 1; i >= 0; i--) { if (sum + i + 1 <= goal) { ans[i] = '1'; sum += i + 1; } } System.out.println(ans); } sc.close(); } }