s1 = input()
s2 = input()
s3 = input()
lst = [s1, s2, s3]
lst.sort()
print(lst[1])