using i64 = long long;
using i128 = __int128;
using u32 = unsigned;
using u64 = unsigned long long;
using f32 = double;
using f64 = long double;
#define uset unordered_set
#define umap unordered_map
#define vi vector<int>
#define vvi vector<vi>
#define vll vector<i64>
#define vvll vector<vll>
#define pii pair<int, int>
#define pll pair<i64, i64>
#define vpii vector<pii>
#define vpll vector<pll>
#define vvpii vector<vpii>
#define vvpll vector<vpll>
#define vz vector<Z>
#define vvz vector<vz>
#define pb push_back
#define pq priority_queue
#define ALL(x) (x).begin(), (x).end()
#define rep(i, x, y) for (int (i) = (x); (i) < (y); (i)++)
#define repr(i, x, y) for (int (i) = (x); (i) > (y); (i)--)
#define YES "YES\n"
#define NO "NO\n"
#define SZ(x) (static_cast<int>(x.size()))
#include <bits/stdc++.h>
using namespace std;
mt19937_64 rng((unsigned) chrono::high_resolution_clock::now().time_since_epoch().count());
void solve() {
int l, r, x;
cin >> l >> r >> x;
int f = 0;
if (x < 0) {
f = 1;
x *= -1;
}
if (r - l < x) {
cout << -1 << " " << -1 << "\n";
} else {
if (!f) cout << l + x << " " << l << "\n";
else cout << l << " " << l + x << "\n";
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int t;
cin >> t;
while (t--) solve();
}