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