#include <iostream>

using namespace std;

int main()
{
    cin.tie(0);
    int n;
    cin>>n;
    for (int i=0;i<n;i++)
    {
        int a,b;
        cin>>a>>b;
        cout<<"-1"<<"\n";
    }
    return 0;
}