Q=int(input()) for _ in range(Q): A=list(map(int,input().split())) if A[0]==1: print(A[1]+A[2]) else: print(_+1)