#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  if (n == 1) {
    cout << -1 << endl;
    return;
  } else if (n == 2) {
    cout << 23 << endl;
    return;
  } else {
    if (n % 3 == 1) {
      for (long long i = 0; i < n - 2; i++) {
        cout << 2;
      }
      cout << 33 << endl;
    } else {
      for (long long i = 0; i < n - 1; i++) {
        cout << 2;
      }
      cout << 3 << endl;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t) {
    solve();
    t--;
  }
  return 0;
}
