from collections import Counter

print((Counter(input().split()).most_common()[-1][0]))
l=input().split();print((min(l,key=lambda x:l.count(x))))
from collections import Counter

print((Counter(input().split()).most_common()[-1][0]))

l = input().split()
print((min(l, key=lambda x: l.count(x))))

-from collections import Counter - -print((Counter(input().split()).most_common()[-1][0])) +l = input().split() +print((min(l, key=lambda x: l.count(x))))