#include <bits/stdc++.h>
using namespace std;
const long long N = 100005, INF = 2000000000000000000;
long long power(long long a, long long b, long long p) {
  if (a == 0) return 0;
  long long res = 1;
  a %= p;
  while (b > 0) {
    if (b & 1) res = (res * a) % p;
    b >>= 1;
    a = (a * a) % p;
  }
  return res;
}
bool prime[N] = {true};
long long sum[N] = {0};
void pre() {
  memset(prime, true, sizeof(prime));
  for (long long i = 2; i <= N; i++) {
    if (prime[i]) {
      for (long long j = i * i; j <= N; j += i) {
        prime[j] = false;
      }
    }
  }
  for (long long i = 2; i < N; i++) {
    if (prime[i]) sum[i] += i;
    sum[i + 1] = sum[i];
  }
  return;
}
int32_t main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  pre();
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    if (n == 1) {
      cout << "-1"
           << "\n";
    } else {
      long long yup[n];
      for (long long i = 0; i < n; i++) {
        yup[i] = 3;
      }
      yup[0] = 2;
      if (n % 2 != 0) {
        yup[1] = 2;
      }
      for (long long i = 0; i < n; i++) {
        cout << yup[i];
      }
      cout << "\n";
    }
  }
}
