#include <bits/stdc++.h>
 
using namespace std;


 
int main()
{
    ios_base::sync_with_stdio(false);
    int t;
    cin>>t;
    for(int i = 0; i < t; i++){
        int n;
        cin>>n;
        if(n == 1){
            cout<<-1<<endl;
        }
        else{
            string res = "";
            if(n % 3 == 1){
              
                for(int j = 0; j < n - 2; j++){
                    res += '2';
                }
                res += "33";
            }
            else{
                
                for(int j = 0; j < n - 1; j++){
                    res += '2';
                }
                res += '3';
            }
            cout<<res<<endl;
        }
    }
    return 0;
}