# coding: utf-8
# Here your code !
ret = []
for i in range(10):
    ret.append(int(input()))

ret.sort()

print(ret[-1])
print(ret[-2])
print(ret[-3]) ret = [] ret [] for i in range(10):
    ret.append(int(input())) i range(10) range 10 ret.append(int(input())) ret.append ret append int(input()) int input() input ret.sort() ret.sort ret sort print(ret[-1]) print ret[-1] ret -1 print(ret[-2]) print ret[-2] ret -2 print(ret[-3]) print ret[-3] ret -3 ret = [] [] ret
# coding: utf-8
# Here your code !
ret = []
for i in range(10):
    ret.append(int(input()))

ret.sort()

print(ret[-1])
print(ret[-2])
print(ret[-3])