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

int main(){
ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
short t; cin >> t;
while(t--){
ll n, m, s; cin >> n >> m >> s;
if ( m == n-1 ){
    cout << -1;
}































}

return 0;
}