t = int(input().strip()) cnt = 1 while cnt <= t: s = list(map(int, input().strip().split())) print(sum(s[1:])) print() cnt = cnt+1