Q=int(input()) for i in range(Q): t,*A=map(int,input().split()) if t==1: a,b=A[:] print(a+b) else: print(i+1)