A=[int(_) for _ in input().split()]

B=sum(A)

S=15-B

print(S)
A=[int(_) for _ in input().split()]

print((15-sum(A)))
A = [int(_) for _ in input().split()]
B = sum(A)
S = 15 - B
print(S)

A = [int(_) for _ in input().split()]
print((15 - sum(A)))

-B = sum(A) -S = 15 - B -print(S) +print((15 - sum(A)))