l = []

for i in range(10):
    l.append(int(input()))

l.sort()

for i in range(3):
    print(l[-1 * (i+1)]) 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[-1 * (i+1)]) i range(3) range 3 print(l[-1 * (i+1)]) print l[-1 * (i+1)] l -1 * (i+1) -1 i+1 i 1 l = [] [] l
l = []

for i in range(10):
    l.append(int(input()))

l.sort()

for i in range(3):
    print(l[-1 * (i+1)])