# coding: utf-8
# Here your code !
array = []
for i in range(10):
 line = int(input())
 array += [line]

result = sorted(array)[::-1]

print(result[0])
print(result[1])
print(result[2]) array = [] array [] for i in range(10):
 line = int(input())
 array += [line] i range(10) range 10 line = int(input()) line int(input()) int input() input array += [line] array [line] line result = sorted(array)[::-1] result sorted(array)[::-1] (array) sorted array ::-1 -1 print(result[0]) print result[0] result 0 print(result[1]) print result[1] result 1 print(result[2]) print result[2] result 2 array += [line] [line] array line = int(input()) int(input()) line result = sorted(array)[::-1] sorted(array)[::-1] result array = [] [] array
# coding: utf-8
# Here your code !
array = []
for i in range(10):
 line = int(input())
 array += [line]

result = sorted(array)[::-1]

print(result[0])
print(result[1])
print(result[2])