lists = []
for i in range(10):
    a = int(input())
    lists.append(a)
f = sorted(lists, reverse = True)
for i in range(3):
    print(f[i]) lists = [] lists [] for i in range(10):
    a = int(input())
    lists.append(a) i range(10) range 10 a = int(input()) a int(input()) int input() input lists.append(a) lists.append lists append a f = sorted(lists, reverse = True) f sorted(lists, reverse = True) sorted lists reverse = True reverse True for i in range(3):
    print(f[i]) i range(3) range 3 print(f[i]) print f[i] f i a = int(input()) int(input()) a lists = [] [] lists f = sorted(lists, reverse = True) sorted(lists, reverse = True) f
lists = []
for i in range(10):
    a = int(input())
    lists.append(a)
f = sorted(lists, reverse = True)
for i in range(3):
    print(f[i])