s=[input() for _ in range(3)] print(sorted([[i,s.count(i)] for i in set(s)],key=lambda x:-x[1])[0][0])