#include using namespace std; using ll = long long; int N, t; string T; int main(void){ cin >> t; for (int i = 0; i < t; i++) { cin >> N; T = ""; if (N % 4 == 0 || N % 4 == 3) { for (int j = 1; j <= N; j++) { if (N % 4 == 0) { if (j % 4 == 0 || j % 4 == 1) T += '0'; else T += '1'; } else { if (j % 4 == 0 || j % 4 == 3) T += '0'; else T += '1'; } } cout << T << endl; } else { cout << -1 << endl; } } return 0; }