# -*- coding: utf-8 -*-

hills_list = []
while len(hills_list) != 10:
    hills = raw_input()
    if (10000 >= int(hills)) and (int(hills) >= 0):
        hills_list.append(int(hills))
hills_list.sort()
print hills_list[-1]
print hills_list[-2]
print hills_list[-3] hills_list = [] hills_list [] while len(hills_list) != 10:
    hills = raw_input()
    if (10000 >= int(hills)) and (int(hills) >= 0):
        hills_list.append(int(hills)) len(hills_list) != 10 len(hills_list) len hills_list 10 hills = raw_input() hills raw_input() raw_input if (10000 >= int(hills)) and (int(hills) >= 0):
        hills_list.append(int(hills)) (10000 >= int(hills)) and (int(hills) >= 0) 10000 >= int(hills) 10000 int(hills) int hills int(hills) >= 0 int(hills) int hills 0 hills_list.append(int(hills)) hills_list.append hills_list append int(hills) int hills hills_list.sort() hills_list.sort hills_list sort print hills_list[-1] hills_list -1 print hills_list[-2] hills_list -2 print hills_list[-3] hills_list -3 hills = raw_input() raw_input() hills hills_list = [] [] hills_list
# -*- coding: utf-8 -*-

hills_list = []
while len(hills_list) != 10:
    hills = raw_input()
    if (10000 >= int(hills)) and (int(hills) >= 0):
        hills_list.append(int(hills))
hills_list.sort()
print hills_list[-1]
print hills_list[-2]
print hills_list[-3]