#include #define X first #define Y second #define eb push_back #define siz(a) int(a.size()) #define endl "\n" #define trace2(x, y) cout <<#x<<": "< vi; typedef vector < ll > vll; const int mod=1e9+7; const int maxn=1e6+5; /* finding inverse upto n * for i in xrange(2, N): ifc[i] = -(mod / i) * ifc[mod % i] % mod * */ ll power(ll base, ll exp){ll res = 1; while(exp){if(exp%2)res*=base;base*=base;res%=mod;base%=mod;exp/=2;}return res;} int main(){ ios_base::sync_with_stdio(false);cin.tie(NULL); cout.tie(NULL); //freopen("input.in", "r", stdin);freopen("output.out", "w", stdout); ll t, a, b, c; cin >> t; while(t--){ cin >> a >> b >> c; cout << a+b - c << endl; } return 0; }