#include <bits/stdc++.h>
using namespace std;
int q, n;
void solve() {
  cin >> n;
  if (n == 1) {
    cout << "-1" << endl;
    return;
  } else if (n == 2) {
    cout << "23" << endl;
  } else {
    for (int i = 0; i < n - 2; i++) {
      cout << "2";
    }
    if ((2 * n + 1) % 3 == 0) {
      cout << "43" << endl;
    } else {
      cout << "23" << endl;
    }
  }
}
int main() {
  cin >> q;
  while (q--) {
    solve();
  }
}
