l = []
for i in range(10):
    l.append(int(input()))
l.sort()
for i in range(3):
    print(l[9-i]) l = [] l [] for i in range(10):
    l.append(int(input())) i range(10) range 10 l.append(int(input())) l.append l append int(input()) int input() input l.sort() l.sort l sort for i in range(3):
    print(l[9-i]) i range(3) range 3 print(l[9-i]) print l[9-i] l 9-i 9 i l = [] [] l
l = []
for i in range(10):
    l.append(int(input()))
l.sort()
for i in range(3):
    print(l[9-i])
