#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, p;
    cin >> n;
    p = n - 1;
    if (n == 1)
      cout << -1 << endl;
    else {
      if (n % 3 != 1) {
        while (p--) cout << 2;
        cout << 3 << endl;
      } else {
        cout << 2;
        while (p--) cout << 3;
        cout << endl;
      }
    }
  }
  return 0;
}
