line = [0]*10
for i in range(0, 10):
    line[i] = int(input())
line.sort(reverse=True, key=int)
for i in range(0, 3):
    print(line[i]) line = [0]*10 line [0]*10 [0] 0 10 for i in range(0, 10):
    line[i] = int(input()) i range(0, 10) range 0 10 line[i] = int(input()) line[i] line i int(input()) int input() input line.sort(reverse=True, key=int) line.sort line sort reverse=True reverse True key=int key int for i in range(0, 3):
    print(line[i]) i range(0, 3) range 0 3 print(line[i]) print line[i] line i line = [0]*10 [0]*10 line
line = [0]*10
for i in range(0, 10):
    line[i] = int(input())
line.sort(reverse=True, key=int)
for i in range(0, 3):
    print(line[i])