#include<bits/stdc++.h>
#define ll long long
#define nl '\n'
#define F first
#define S second
#define all(a) (a.begin()),(a.end())
#define UNIQUE(X) (X).erase(unique(all(X)),(X).end())
#define SORT_UNIQUE(c) (sort(c.begin(),c.end()), c.resize(distance(c.begin(),unique(c.begin(),c.end()))))
#define ms(a,b) memset(a, b, sizeof(a))
#define Input freopen("in.txt","r",stdin)
#define Output freopen("out.txt","w",stdout)
#define MOD 1000000007
using namespace std;
const int N = 2e5 + 5;
void Solve(int t)
{
ll l, r, x;
cin >> l >> r >> x;
ll p, q;
p = l;
q = p - x;
if (q >= l && q <= r) {
cout << p << ' ' << q << nl;
return ;
}
p = r;
q = p - x;
if (q >= l && q <= r) {
cout << p << ' ' << q << nl;
return ;
}
cout << "-1 -1\n";
}
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int t, T = 1;
cin >> T;
for (t = 1; t <= T; t++)
Solve(t);
return 0;
}