# coding: UTF-8
inputs=[]
for i in range(0,10):
    inputs.append(input())
inputs.sort(reverse=True)
#print "\n"
for i in range(0,3):
    print inputs[i] inputs=[] inputs [] for i in range(0,10):
    inputs.append(input()) i range(0,10) range 0 10 inputs.append(input()) inputs.append inputs append input() input inputs.sort(reverse=True) inputs.sort inputs sort reverse=True reverse True for i in range(0,3):
    print inputs[i] i range(0,3) range 0 3 print inputs[i] inputs i inputs=[] [] inputs
# coding: UTF-8
inputs=[]
for i in range(0,10):
    inputs.append(input())
inputs.sort(reverse=True)
#print "\n"
for i in range(0,3):
    print inputs[i]