#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const double PI = 2 * acos(0.0);
const long double EPS = 1.0E-14;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, flag = 0, sum = 0;
    string s = "";
    cin >> n;
    if (n == 1)
      cout << "-1" << endl;
    else {
      for (int i = 0; i < n - 1; i++) {
        s += '2';
        sum += 2;
      }
      if (sum % 3 == 0) {
        s.pop_back();
        s += '7';
        s += '3';
      } else {
        s += '3';
      }
      cout << s << endl;
    }
  }
  return 0;
}
