#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define dub double
#define ull unsigned long long
#define CY cout << "YES\n";
#define CN cout << "NO\n";
#define pb push_back
#define eb emplace_back
#define ft first
#define sd second
#define srt(v) sort(v.begin(), v.end())
#define csrt(v) sort(v.begin(), v.end(), cmp)
#define rsrt(v) sort(v.rbegin(), v.rend())
#define pll pair<ll, ll>
#define vll vector<pll>
#define mod1 1000000000+7 // 10^9 + 7
const ll mod = 998244353;
const ll inf = 9000000000000000000;
bool cmp(const pair<string, pair<string, ll>> &a, const pair<string, pair<string, ll>> &b)
{
if(a.sd.ft != b.sd.ft) return a.sd.ft < b.sd.ft;
if(a.ft != b.ft) return a.ft < b.ft;
return a.sd.sd > b.sd.sd;
}
const ll mx = 1e5+150;
vll adj[mx];
void solve(int cs)
{
ll a, b, x;
cin >> a >> b >> x;
if(a >= x) a -= x, x = 0;
else a = 0, x -= a;
if(b >= x) b -= x;
else b = 0;
cout << a << " " << b << endl;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int tc=1, cnt=1;
cin >> tc;
while (tc--){
solve(cnt);
cnt++;
}
return 0;
}