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

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    /////////////////////////////////


    int t;
    cin >> t;
    for (int i=0;i<t;i++){
        long long a;
        long long b;
        cin >> a >> b;
    }
    for (int i=0;i<t;i++){
        cout << "-1" << endl;
    }

    return 0;
}