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