#include #include #include #include using namespace std; using i64 = long long; #define yn(pope) (pope ? "Yes" : "No") #define rep(i, n, m) for (int i = (n); i < (m); i++) #define rrep(i, n, m) for (int i = (n); i > m; i--) #define IINF (1 << 30) #define INF (1ll << 60) #define all(v) v.begin(), v.end() int main() { int T; cin >> T; while (T--) { int N; cin >> N; string ans = ""; rep(i, 0, N >> 2) { ans += "0110"; } N %= (1 << 2); if (1 <= N && N <= 2) { ans = "-1"; } reverse(all(ans)); if (N == 3) { ans += "011"; } reverse(all(ans)); cout << ans << endl; } return 0; }