// Author: Shawn Das Shachin-->(shawn_das)
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define pb push_back
#define mod 1000000007
#define srt(v) sort(v.begin(),v.end())
#define rsrt(v) sort(v.rbegin(),v.rend())
#define OPTIMIZE_IO ios::sync_with_stdio(false); cin.tie(nullptr);
#define setbit(x) __builtin_popcount(x);
#define printp(v) { for(auto &it : v) std::cout << it.first << " " << it.second << std::endl; }
#define printarr(arr) { for(auto &it : arr) std::cout << it << " "; std::cout << std::endl; }
void solve() {
int a,b,x;
cin>>a>>b>>x;
if(x<=a){
cout<<a-x<<" "<<b<<endl;
}
else{
cout<<0<<" "<<max(0,(a+b)-x)<<endl;
}
}
int main() {
OPTIMIZE_IO;
int t;
cin>>t;
while(t--){
solve();
}
}