A=[]
for i in range(10):
    A.append(int(raw_input()))
A.sort()
print A[-1]
print A[-2]
print A[-3] A=[] A [] for i in range(10):
    A.append(int(raw_input())) i range(10) range 10 A.append(int(raw_input())) A.append A append int(raw_input()) int raw_input() raw_input A.sort() A.sort A sort print A[-1] A -1 print A[-2] A -2 print A[-3] A -3 A=[] [] A
A=[]
for i in range(10):
    A.append(int(raw_input()))
A.sort()
print A[-1]
print A[-2]
print A[-3]