#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  for (int T = 0; T < t; T++) {
    int N;
    cin >> N;
    int l = -1;
    if (N == 1)
      cout << -1 << endl;
    else if ((N - 1) % 3 == 0) {
      cout << 4;
      for (int i = 1; i < N - 1; i++) {
        cout << 2;
      }
      cout << 3 << endl;
    } else {
      for (int i = 0; i < N - 1; i++) {
        cout << 2;
      }
      cout << 3 << endl;
    }
  }
  return 0;
}
