#include #define ll long long #define ld long double #define ull unsigned long long #define fast_input cin.tie(NULL); ios_base::sync_with_stdio(false) #define pb push_back #define mp make_pair #define pii make_pair using namespace std; const int mod = 1e9+7; int main(){ int t; cin >> t; while(t--){ int a, b, c; cin >> a >> b >> c; cout << (a+b)-c << "\n"; } return 0; }