#include <bits/stdc++.h>
using namespace std;
const string yes = "Yes", no = "No";
int main() {
  long long T;
  cin >> T;
  while (T--) {
    long long n;
    cin >> n;
    if (n == 1) {
      cout << -1;
      cout << "\n";
    } else {
      long long x = (n - 1) * 5;
      for (long long i = 0; i < n - 1; i++) {
        cout << "5";
      }
      cout << 8;
      cout << "\n";
    }
  }
}
