<gh_stars>0
a = int(input())

b, c = map(int, input().split())

s = str(input())

print("{} {}".format(a + b + c, s))

a = int(input())

b, c = map(int, input().split())

s = str(input())

print("{} {}".format(a + b + c, s))