/* -*- coding: utf-8 -*- * * 2608.cc: No.2608 Divide into two - yukicoder */ #include #include using namespace std; /* constant */ const int MAX_N = 100; /* typedef */ /* global variables */ int as[MAX_N]; /* subroutines */ /* main */ int main() { int tn; scanf("%d", &tn); while (tn--) { int n; scanf("%d", &n); int s = n * (n + 1) / 2; if (s & 1) { puts("-1"); continue; } int t = s / 2; fill(as, as + n, 0); for (int i = n; i >= 1; i--) if (t >= i) { as[i - 1] = 1; t -= i; } for (int i = 0; i < n; i++) printf("%d", as[i]); putchar('\n'); } return 0; }