#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long m, i, k, z, n, summa = 0, len, t;
  vector<string> answer;
  string s;
  cin >> t;
  for (i = 0; i < t; i++) {
    cin >> n;
    if (n == 1) {
      s.push_back('-');
      s.push_back('1');
    } else {
      if ((n - 1) % 3 == 0) {
        for (k = 0; k < n - 2; k++) s.push_back('2');
        s.push_back('3');
        s.push_back('3');
      } else {
        for (k = 0; k < n - 1; k++) s.push_back('2');
        s.push_back('3');
      }
    }
    answer.push_back(s);
    s.clear();
  }
  for (i = 0; i < t; i++) cout << answer[i] << endl;
}
