#include <bits/stdc++.h>
using namespace std;
int t;
long n;
int main() {
  scanf("%d", &t);
  while (t--) {
    scanf("%ld", &n);
    if (n == 1)
      printf("-1\n");
    else {
      for (int i = 1; i < n - 1; ++i) printf("2");
      if (n % 3 == 1)
        printf("43\n");
      else
        printf("23\n");
    }
  }
  return 0;
}
