#include <bits/stdc++.h> #define pb push_back #define mp make_pair using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int t; cin>>t; while(t--){ int x,y,z; cin>>x>>y>>z; cout<<x+y-z<<"\n"; } return 0; }