# coding: utf-8

mountains = []
for i in range(10):
    mountains.append(int(input()))
    
outputCount = 3    
for height in list(reversed(sorted(mountains))):
    print(height)
    outputCount -= 1
    if outputCount == 0:
        break mountains = [] mountains [] for i in range(10):
    mountains.append(int(input()))
     i range(10) range 10 mountains.append(int(input())) mountains.append mountains append int(input()) int input() input outputCount = 3 outputCount 3 for height in list(reversed(sorted(mountains))):
    print(height)
    outputCount -= 1
    if outputCount == 0:
        break height list(reversed(sorted(mountains))) list reversed(sorted(mountains)) reversed sorted(mountains) sorted mountains print(height) print height outputCount -= 1 outputCount 1 if outputCount == 0:
        break outputCount == 0 outputCount 0 break mountains = [] [] mountains outputCount -= 1 1 outputCount outputCount = 3 3 outputCount
# coding: utf-8

mountains = []
for i in range(10):
    mountains.append(int(input()))
    
outputCount = 3    
for height in list(reversed(sorted(mountains))):
    print(height)
    outputCount -= 1
    if outputCount == 0:
        break