a_list = []
for i in range(10):
    while True:
        a = input()
        a = int(a)
        if 0<=a and a<=10000:break
    a_list.append(a)

for i in range(3):
    print(max(a_list))
    a_list.remove(max(a_list)) a_list = [] a_list [] for i in range(10):
    while True:
        a = input()
        a = int(a)
        if 0<=a and a<=10000:break
    a_list.append(a) i range(10) range 10 while True:
        a = input()
        a = int(a)
        if 0<=a and a<=10000:break
     True a = input() a input() input a = int(a) a int(a) int a if 0<=a and a<=10000:break
     0<=a and a<=10000 0<=a 0 a a<=10000 a 10000 a_list.append(a) a_list.append a_list append a for i in range(3):
    print(max(a_list))
    a_list.remove(max(a_list)) i range(3) range 3 print(max(a_list)) print max(a_list) max a_list a_list.remove(max(a_list)) a_list.remove a_list remove max(a_list) max a_list a = int(a) int(a) a a_list = [] [] a_list a = input() input() a
a_list = []
for i in range(10):
    while True:
        a = input()
        a = int(a)
        if 0<=a and a<=10000:break
    a_list.append(a)

for i in range(3):
    print(max(a_list))
    a_list.remove(max(a_list))
