#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 a, b, x;
cin >> a >> b >> x;
ll e = min(a, x);
a -= e;
x -= e;
b -= min(b, x);
cout << a << ' ' << b << endl;
}
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;
}