mountains = []

for i in range(10):
    m = int(input())
    mountains.append(m)

mountains.sort(reverse=True)

for i in range(3):
    print(mountains[i]) mountains = [] mountains [] for i in range(10):
    m = int(input())
    mountains.append(m) i range(10) range 10 m = int(input()) m int(input()) int input() input mountains.append(m) mountains.append mountains append m mountains.sort(reverse=True) mountains.sort mountains sort reverse=True reverse True for i in range(3):
    print(mountains[i]) i range(3) range 3 print(mountains[i]) print mountains[i] mountains i m = int(input()) int(input()) m mountains = [] [] mountains
mountains = []

for i in range(10):
    m = int(input())
    mountains.append(m)

mountains.sort(reverse=True)

for i in range(3):
    print(mountains[i])
