num = int(input())
for i in range(num):
    case = input().split()
    print(int(case[0]) + int(case[1]))
num = int(input())
for i in range(num):
    case = input().split()
    print(int(case[0]) + int(case[1]))