#include #include using namespace std; #define FOR(i, begin, end) for (int i = (begin), i##_end_ = (end); i < i##_end_; i++) #define REP(i, n) FOR(i,0,n) int main() { int T; cin >> T; while (T--) { int N; cin >> N; const int sum = (1 + N) * N / 2; auto solve = [&]() -> string { if (sum % 2) return "-1"; if (N % 4 == 0) { string ret; REP(_, N / 4) ret += "1001"; return ret; } if (N % 4 == 3) { string ret = "110"; REP(_, N / 4) ret += "1001"; return ret; } throw; }; cout << solve() << '\n'; } }