mountains_high=[]
for i in range(10):
    mountains_high.append(int(input()))

mountains_high_copy=mountains_high.copy()
for i in range(9):
    for j in range(9):
        if mountains_high_copy[j]>mountains_high_copy[j+1]:
            num=mountains_high_copy[j]
            mountains_high_copy[j]=mountains_high_copy[j+1]
            mountains_high_copy[j+1]=num

for i in range(3):
    print(mountains_high_copy[9-i]) mountains_high=[] mountains_high [] for i in range(10):
    mountains_high.append(int(input())) i range(10) range 10 mountains_high.append(int(input())) mountains_high.append mountains_high append int(input()) int input() input mountains_high_copy=mountains_high.copy() mountains_high_copy mountains_high.copy() mountains_high.copy mountains_high copy for i in range(9):
    for j in range(9):
        if mountains_high_copy[j]>mountains_high_copy[j+1]:
            num=mountains_high_copy[j]
            mountains_high_copy[j]=mountains_high_copy[j+1]
            mountains_high_copy[j+1]=num i range(9) range 9 for j in range(9):
        if mountains_high_copy[j]>mountains_high_copy[j+1]:
            num=mountains_high_copy[j]
            mountains_high_copy[j]=mountains_high_copy[j+1]
            mountains_high_copy[j+1]=num j range(9) range 9 if mountains_high_copy[j]>mountains_high_copy[j+1]:
            num=mountains_high_copy[j]
            mountains_high_copy[j]=mountains_high_copy[j+1]
            mountains_high_copy[j+1]=num mountains_high_copy[j]>mountains_high_copy[j+1] mountains_high_copy[j] mountains_high_copy j mountains_high_copy[j+1] mountains_high_copy j+1 j 1 num=mountains_high_copy[j] num mountains_high_copy[j] mountains_high_copy j mountains_high_copy[j]=mountains_high_copy[j+1] mountains_high_copy[j] mountains_high_copy j mountains_high_copy[j+1] mountains_high_copy j+1 j 1 mountains_high_copy[j+1]=num mountains_high_copy[j+1] mountains_high_copy j+1 j 1 num for i in range(3):
    print(mountains_high_copy[9-i]) i range(3) range 3 print(mountains_high_copy[9-i]) print mountains_high_copy[9-i] mountains_high_copy 9-i 9 i num=mountains_high_copy[j] mountains_high_copy[j] num mountains_high_copy=mountains_high.copy() mountains_high.copy() mountains_high_copy mountains_high=[] [] mountains_high
mountains_high=[]
for i in range(10):
    mountains_high.append(int(input()))

mountains_high_copy=mountains_high.copy()
for i in range(9):
    for j in range(9):
        if mountains_high_copy[j]>mountains_high_copy[j+1]:
            num=mountains_high_copy[j]
            mountains_high_copy[j]=mountains_high_copy[j+1]
            mountains_high_copy[j+1]=num

for i in range(3):
    print(mountains_high_copy[9-i])