n=int(input()) for i in range(n): b,s,c=list(map(int,input().split())) mb=c-s print(b-mb)