//Author: Bishal Sarang #include using namespace std; typedef unsigned long long ull; typedef long long ll; int main() { int t; cin >> t; int b, s , c; while(t--) { cin >> b >> s >> c; cout << c - ((c - s) + (c - b)) << "\n"; } return 0; }