<reponame>private-yusuke/Competitive-Programming
A, B, C = map(int, input().split())
if A==B: print(C)
elif B==C: print(A)
else: print(B)
A, B, C = map(int, input().split())
if A==B: print(C)
elif B==C: print(A)
else: print(B)