#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int t; cin >> t; while(t--){ int b, c, s; cin >> b >> s >> c; cout << (b+s-c) << endl; } return 0; }