heights = sorted([int(eval(input())) for n in range(10)])

for idx in range(-1, -4, -1):

    print(heights[idx])
l = sorted([eval(input()) for x in range(10)], reverse=True)

for h in l[:3]:

    print(h)
heights = sorted([int(eval(input())) for n in range(10)])
for idx in range(-1, -4, -1):
    print(heights[idx])

l = sorted([eval(input()) for x in range(10)], reverse=True)
for h in l[:3]:
    print(h)

-heights = sorted([int(eval(input())) for n in range(10)]) -for idx in range(-1, -4, -1): -    print(heights[idx]) +l = sorted([eval(input()) for x in range(10)], reverse=True) +for h in l[:3]: +    print(h)