for _ in range(int(input())):
prob = input()
if prob != 'P=NP':
a, b = map(int, prob.split('+'))
print(a + b)
else:
print('skipped')
for _ in range(int(input())):
prob = input()
if prob != 'P=NP':
a, b = map(int, prob.split('+'))
print(a + b)
else:
print('skipped')