#include <bits/stdc++.h>
#define JAISHRIRAM ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define TxtIO freopen("input.txt","r",stdin); freopen("output.txt","w",stdout);
#define f(i,a,b) for(int i=a;i<b;i++)
#define input for(auto &it:arr){cin>>it;}
#define pb push_back
#define ll long long
using namespace std;
void solve(){
ll l,r,x;
cin>>l>>r>>x;
// l<=p<=r
// l<=q<=r
if(x<0 || (r-l)<x){
cout<<-1<<" "<<-1<<"\n";
}else{
cout<<r<<" "<<r-x<<"\n";
}
}
int main() {
JAISHRIRAM
int t;
cin>>t;
while(t--){
solve();
}
}