#include #include #include #include #include using namespace std; int main() { int t; scanf("%d", &t); while (t--) { int b, s, c; scanf("%d %d %d", &b, &s, &c); printf("%d\n", s - c + b); } return 0; }