#include <bits/stdc++.h>
using namespace std;
int main() {
  iostream::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    if (n == 1) {
      cout << "-1\n";
      continue;
    }
    for (int i = 0; i < n - 2; i++) cout << 2;
    if ((n - 1) % 3 == 0)
      cout << "33\n";
    else
      cout << "23\n";
  }
}
