mountains = []
[mountains.append(int(input())) for i in range(10)]
mountains = sorted(mountains)[::-1]
for j in range(3):
    print(mountains[j]) mountains = [] mountains [] mountains.append(int(input())) for i in range(10) for i in range(10) i range(10) range 10 for i in range(10) mountains.append(int(input())) mountains.append mountains append int(input()) int input() input [mountains.append(int(input())) for i in range(10)] mountains = sorted(mountains)[::-1] mountains sorted(mountains)[::-1] (mountains) sorted mountains ::-1 -1 for j in range(3):
    print(mountains[j]) j range(3) range 3 print(mountains[j]) print mountains[j] mountains j mountains = [] [] mountains mountains = sorted(mountains)[::-1] sorted(mountains)[::-1] mountains
mountains = []
[mountains.append(int(input())) for i in range(10)]
mountains = sorted(mountains)[::-1]
for j in range(3):
    print(mountains[j])