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)