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