#include <bits/stdc++.h>
using namespace std;
using pll = pair<long long, long long>;
long long gcd_helper(long long a, long long b) {
  if (a % b == 0)
    return b;
  else
    return gcd_helper(b, a % b);
}
long long gcd(long long a, long long b) {
  if (a < 0) a *= -1;
  if (b < 0) b *= -1;
  if (a < b) swap(a, b);
  if (b == 0) return a;
  return gcd_helper(a, b);
}
long long powr(long long a, long long b, long long M) {
  if (b == 0) return 1;
  if (a == 0) return 0;
  long long ret = 1;
  while (b) {
    if (b & 1) {
      ret *= a;
      ret %= M;
    }
    a = (a * a) % M;
    b /= 2;
  }
  return ret;
}
long long find(long long x, vector<long long> &p) {
  if (p[x] != x) p[x] = find(p[x], p);
  return p[x];
}
void unite(long long x, long long y, vector<long long> &p,
           vector<long long> &sz) {
  long long px = find(x, p);
  long long py = find(y, p);
  if (sz[px] < sz[py]) {
    swap(px, py);
    swap(x, y);
  }
  p[py] = px;
  sz[px] += sz[py];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    if (n == 1) {
      cout << -1 << endl;
      continue;
    }
    while (--n) cout << 3;
    cout << 8 << endl;
  }
  return 0;
}
