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