#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int k = 0; k < t; k++) {
    int n;
    cin >> n;
    bool sate = true;
    char arr[n];
    for (int i = 0; i < n; i++) {
      if (sate == false) {
        arr[i] = '3';
        sate = true;
      } else {
        arr[i] = '9';
        sate = false;
      }
    }
    arr[n - 2] = '2';
    if (n == 1)
      cout << -1;
    else {
      for (int i = 0; i < n; i++) cout << arr[i];
    }
    cout << endl;
  }
  return 0;
}
