mt = []

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

mt.sort()
print( mt[9] )
print( mt[8] )
print( mt[7] ) mt = [] mt [] for i in range(10):
        mt.append(int(input())) i range(10) range 10 mt.append(int(input())) mt.append mt append int(input()) int input() input mt.sort() mt.sort mt sort print( mt[9] ) print mt[9] mt 9 print( mt[8] ) print mt[8] mt 8 print( mt[7] ) print mt[7] mt 7 mt = [] [] mt
mt = []

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

mt.sort()
print( mt[9] )
print( mt[8] )
print( mt[7] )