#List of Top 3 Hills

set = []
a = 9
for i in range(10):
    n = int(input())
    set.append(n)
set.sort()
while a >= 7:
    print(set[a])
    a -= 1 set = [] set [] a = 9 a 9 for i in range(10):
    n = int(input())
    set.append(n) i range(10) range 10 n = int(input()) n int(input()) int input() input set.append(n) set.append set append n set.sort() set.sort set sort while a >= 7:
    print(set[a])
    a -= 1 a >= 7 a 7 print(set[a]) print set[a] set a a -= 1 a 1 set = [] [] set n = int(input()) int(input()) n a = 9 9 a a -= 1 1 a
#List of Top 3 Hills

set = []
a = 9
for i in range(10):
    n = int(input())
    set.append(n)
set.sort()
while a >= 7:
    print(set[a])
    a -= 1