height = [0 for i in range(10)]
sort_height = [0 for i in range(10)]

#set
for i in range(10):
    height[i] = int(input())

#sort
for i in range(10):
    for j in range(10):
        if height[i] >= sort_height[j]:
            #?????????
            for k in range(9, j, -1):
                sort_height[k] = sort_height[k-1] 

            sort_height[j] = height[i]
            break
        
for i in range(3):
    print(sort_height[i]) 0 for i in range(10) for i in range(10) i range(10) range 10 for i in range(10) 0 height = [0 for i in range(10)] height [0 for i in range(10)] 0 for i in range(10) for i in range(10) i range(10) range 10 for i in range(10) 0 sort_height = [0 for i in range(10)] sort_height [0 for i in range(10)] for i in range(10):
    height[i] = int(input())

#sort i range(10) range 10 height[i] = int(input()) height[i] height i int(input()) int input() input for i in range(10):
    for j in range(10):
        if height[i] >= sort_height[j]:
            #?????????
            for k in range(9, j, -1):
                sort_height[k] = sort_height[k-1] 

            sort_height[j] = height[i]
            break
         i range(10) range 10 for j in range(10):
        if height[i] >= sort_height[j]:
            #?????????
            for k in range(9, j, -1):
                sort_height[k] = sort_height[k-1] 

            sort_height[j] = height[i]
            break
         j range(10) range 10 if height[i] >= sort_height[j]:
            #?????????
            for k in range(9, j, -1):
                sort_height[k] = sort_height[k-1] 

            sort_height[j] = height[i]
            break
         height[i] >= sort_height[j] height[i] height i sort_height[j] sort_height j for k in range(9, j, -1):
                sort_height[k] = sort_height[k-1] 

             k range(9, j, -1) range 9 j -1 sort_height[k] = sort_height[k-1] sort_height[k] sort_height k sort_height[k-1] sort_height k-1 k 1 sort_height[j] = height[i] sort_height[j] sort_height j height[i] height i break for i in range(3):
    print(sort_height[i]) i range(3) range 3 print(sort_height[i]) print sort_height[i] sort_height i height = [0 for i in range(10)] [0 for i in range(10)] height sort_height = [0 for i in range(10)] [0 for i in range(10)] sort_height
height = [0 for i in range(10)]
sort_height = [0 for i in range(10)]

#set
for i in range(10):
    height[i] = int(input())

#sort
for i in range(10):
    for j in range(10):
        if height[i] >= sort_height[j]:
            #?????????
            for k in range(9, j, -1):
                sort_height[k] = sort_height[k-1] 

            sort_height[j] = height[i]
            break
        
for i in range(3):
    print(sort_height[i])