#include #include #include #include #include #include #include #include #include #include #include #include #define vll vector #define vvvl vector #define vvl vector> #define VV(a, b, c, d) vector>(a, vector(b, c)) #define VVV(a, b, c, d) vector(a, vvl(b, vll (c, d))); #define re(c, b) for(ll c=0;c> q; re(Q, q){ ll a, b, c;std::cin >> a >> b >> c; ll cnt = 0; if(c==1){ std::cout << -1 << '\n'; continue; } while(a){ if(a