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