# coding: utf-8
N = 10
h = []
for n in range(N):
    h.append(int(input()))

h = sorted(h, reverse = True)

for i in range(3):
    print(h[i]) N = 10 N 10 h = [] h [] for n in range(N):
    h.append(int(input())) n range(N) range N h.append(int(input())) h.append h append int(input()) int input() input h = sorted(h, reverse = True) h sorted(h, reverse = True) sorted h reverse = True reverse True for i in range(3):
    print(h[i]) i range(3) range 3 print(h[i]) print h[i] h i h = sorted(h, reverse = True) sorted(h, reverse = True) h N = 10 10 N h = [] [] h
# coding: utf-8
N = 10
h = []
for n in range(N):
    h.append(int(input()))

h = sorted(h, reverse = True)

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