#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int T; cin >> T; rep(i, T) { int N; cin >> N; int sum = 0; rep(i, N) sum += i + 1; if (sum % 2 != 0) { cout << -1 << endl; continue; } vector v(N); int evn = 0, odd = 0; rep(i, N) { int j = N - i; if (evn + j <= sum / 2) { v[j - 1] = 0; evn += j; } else if (odd + j <= sum / 2) { v[j - 1] = 1; odd += j; } } if (evn != odd) { cout << -1 << endl; continue; } rep(i, N) cout << v[i]; cout << endl; } return 0; }