#include using namespace std; int main() { int t; cin >> t; while(t--){ int b; int s; int c; cin >> b >> s >> c; cout << (b+s-c)<< endl; } return 0; }