data = []
for i in range(10):
    data.append(int(input()))
    
sdata = sorted(data)
for i in range(3):
    print(sdata[9-i]) data = [] data [] for i in range(10):
    data.append(int(input()))
     i range(10) range 10 data.append(int(input())) data.append data append int(input()) int input() input sdata = sorted(data) sdata sorted(data) sorted data for i in range(3):
    print(sdata[9-i]) i range(3) range 3 print(sdata[9-i]) print sdata[9-i] sdata 9-i 9 i sdata = sorted(data) sorted(data) sdata data = [] [] data
data = []
for i in range(10):
    data.append(int(input()))
    
sdata = sorted(data)
for i in range(3):
    print(sdata[9-i])