#coding: utf-8

temp = []
for i in range(10):
    N = input()
    temp.append(N)
temp.sort()
print temp[-1]
print temp[-2]
print temp[-3] temp = [] temp [] for i in range(10):
    N = input()
    temp.append(N) i range(10) range 10 N = input() N input() input temp.append(N) temp.append temp append N temp.sort() temp.sort temp sort print temp[-1] temp -1 print temp[-2] temp -2 print temp[-3] temp -3 N = input() input() N temp = [] [] temp
#coding: utf-8

temp = []
for i in range(10):
    N = input()
    temp.append(N)
temp.sort()
print temp[-1]
print temp[-2]
print temp[-3]