#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long INF = 1000000000000000;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    if (n == 1) {
      cout << -1 << endl;
      continue;
    }
    for (int i = 1; i <= n - 2; i++) cout << 2;
    if (n % 3 == 1) {
      cout << 33;
    } else {
      cout << 23;
    }
    cout << endl;
  }
  return 0;
}
