#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
bool prime(int a) {
  int i, j, k, m, n, ct;
  string s;
  for (i = 2; i <= sqrt(a); i++) {
    if (a % i == 0) return false;
  }
  return true;
}
vector<int> prime_factorise(int a) {
  int i, j, k, m, n, ct;
  string s;
  vector<int> pr;
  for (i = 2; i <= sqrt(a); i++) {
    if (a % i == 0) {
      if (prime(i)) pr.push_back(i);
      if (prime(a / i)) pr.push_back(a / i);
    }
  }
  return pr;
}
int main() {
  int i, j, k, m, n, ct;
  string s;
  int t;
  cin >> t;
  while (t--) {
    cin >> n;
    if (n == 1) {
      cout << "-1\n";
    } else if (n == 2) {
      cout << "57\n";
    } else {
      for (i = 0; i < n - 2; i++) cout << "7";
      cout << "27\n";
    }
  }
  return 0;
}
