#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, p, q, l, b = 0, i, d, m, n, k, sum = 0, t = 1, x = 1, z,
                            y = 0;
  string str;
  str.clear();
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (x == 1) {
      cout << -1 << endl;
      continue;
    }
    cout << 5;
    for (int i = 0; i < x - 1; i++) {
      cout << 7;
    }
    cout << endl;
  }
  return 0;
}
