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