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