#include using namespace std; int main() { int x,y,z,t; cin>>t; while(t--) { cin>>x>>y>>z; cout<<(x+y)-z<