#include using namespace std; signed main() { int t; int a, b, c; cin >> t; while (t--) { cin >> a >> b >> c; cout << a+b-c << endl; } }