#include <bits/stdc++.h>
using namespace std;
void mahakal() {}
int main() {
  mahakal(), ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    if (n == 1)
      cout << -1 << endl;
    else if (n == 2)
      cout << 23 << endl;
    else if (((n - 1) * 2 + 3) % 3 != 0) {
      for (long long i = 0; i < n - 1; i++) {
        cout << 2;
      }
      cout << 3 << endl;
    } else {
      for (long long i = 0; i < n - 2; i++) cout << 2;
      cout << 33 << endl;
    }
  }
  return 0;
}
