# coding: utf-8

list = []

for i in range(10):
    list.append(int(input()))

slist = sorted(list)

for i in range(3):
    print(slist[9-i]) list = [] list [] for i in range(10):
    list.append(int(input())) i range(10) range 10 list.append(int(input())) list.append list append int(input()) int input() input slist = sorted(list) slist sorted(list) sorted list for i in range(3):
    print(slist[9-i]) i range(3) range 3 print(slist[9-i]) print slist[9-i] slist 9-i 9 i list = [] [] list slist = sorted(list) sorted(list) slist
# coding: utf-8

list = []

for i in range(10):
    list.append(int(input()))

slist = sorted(list)

for i in range(3):
    print(slist[9-i])