#include <bits/stdc++.h>
using namespace std;
int main() {
  int q;
  cin >> q;
  while (q--) {
    int n;
    cin >> n;
    string s = "8";
    for (int i = 1; i < n; i++) s += "9";
    if (n == 1) {
      cout << -1 << endl;
    } else {
      cout << s << endl;
    }
  }
  return 0;
}
