#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    ll t;
    ll N;
    ll M;
    cin>>t;
    while(t--){
        cin>>N>>M;
        if(N!=M){
            cout<<-1<<endl;
        }
        else{
            vector<ll> v(N);
            for(int i=0; i<N; i++){
                v[i]=1;
            }
            for(auto x:v){
                cout<<v[x]<<endl;
            }
            

            
        }
    }
    return 0;
}