#include <iostream> #include <fstream> #include <sstream> #include <iomanip> #include <algorithm> #include <vector> #include <string> #include <set> #include <map> #include <queue> #include <stack> #include <cmath> #include <cstring> #include <unordered_set> #include <unordered_map> using namespace std; #define pb push_back #define fst first #define snd second typedef long long ll; typedef pair<int,int> pii; template<typename T> using min_queue=priority_queue<T,vector<T>,greater<T> >; const ll MOD=1e9+7; int main(){ ios::sync_with_stdio(0);cin.tie(0); int T;cin>>T; while(T--){ int a,b,c;cin>>a>>b>>c; cout<<a+b-c<<'\n'; } return 0; }