#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    if (n == 1) {
      cout << -1 << "\n";
    } else if (n == 2) {
      cout << "29\n";
    } else {
      cout << "29";
      n -= 2;
      while (n) {
        cout << "9";
        n--;
      }
      cout << "\n";
    }
  }
  return 0;
}
