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

for i in range(10):
    for j in range(i,10):
        if (heights[j] > heights[i]):
            w = heights[i]
            heights[i] = heights[j]
            heights[j] = w

for i in range(3):
    print(heights[i]) heights = [] heights [] for i in range(10):
    heights.append(int(input())) i range(10) range 10 heights.append(int(input())) heights.append heights append int(input()) int input() input for i in range(10):
    for j in range(i,10):
        if (heights[j] > heights[i]):
            w = heights[i]
            heights[i] = heights[j]
            heights[j] = w i range(10) range 10 for j in range(i,10):
        if (heights[j] > heights[i]):
            w = heights[i]
            heights[i] = heights[j]
            heights[j] = w j range(i,10) range i 10 if (heights[j] > heights[i]):
            w = heights[i]
            heights[i] = heights[j]
            heights[j] = w heights[j] > heights[i] heights[j] heights j heights[i] heights i w = heights[i] w heights[i] heights i heights[i] = heights[j] heights[i] heights i heights[j] heights j heights[j] = w heights[j] heights j w for i in range(3):
    print(heights[i]) i range(3) range 3 print(heights[i]) print heights[i] heights i heights = [] [] heights w = heights[i] heights[i] w
heights = []
for i in range(10):
    heights.append(int(input()))

for i in range(10):
    for j in range(i,10):
        if (heights[j] > heights[i]):
            w = heights[i]
            heights[i] = heights[j]
            heights[j] = w

for i in range(3):
    print(heights[i])