ranking = []

while True:

    try:

        height = int(eval(input()))

        ranking.append(height)

    except:

        break



sortedRanking = sorted(ranking, reverse=True)

print((sortedRanking[0]))

print((sortedRanking[1]))

print((sortedRanking[2]))
# coding: utf-8



mountains = []

for i in range(10):

    mountains.append(int(eval(input())))

    

outputCount = 3    

for height in list(reversed(sorted(mountains))):

    print(height)

    outputCount -= 1

    if outputCount == 0:

        break
ranking = []
while True:
    try:
        height = int(eval(input()))
        ranking.append(height)
    except:
        break
sortedRanking = sorted(ranking, reverse=True)
print((sortedRanking[0]))
print((sortedRanking[1]))
print((sortedRanking[2]))

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

-ranking = [] -while True: -    try: -        height = int(eval(input())) -        ranking.append(height) -    except: +# coding: utf-8 +mountains = [] +for i in range(10): +    mountains.append(int(eval(input()))) +outputCount = 3 +for height in list(reversed(sorted(mountains))): +    print(height) +    outputCount -= 1 +    if outputCount == 0: -sortedRanking = sorted(ranking, reverse=True) -print((sortedRanking[0])) -print((sortedRanking[1])) -print((sortedRanking[2]))