#include <bits/stdc++.h>
using namespace std;
long long power(long long base, long long exp) {
  long long res = 1;
  while (exp > 0) {
    if (exp % 2 == 1) res = (res * base);
    base = (base * base);
    exp /= 2;
  }
  return res;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    if (n == 1) {
      cout << -1 << "\n";
    } else {
      if ((n - 1) % 3 != 0) {
        for (long long i = 0; i < n - 1; i++) {
          cout << 2;
        }
        cout << 3 << "\n";
      } else {
        for (long long i = 0; i < n - 2; i++) {
          cout << 2;
        }
        cout << 39 << "\n";
      }
    }
  }
  return 0;
}
