data = []

for i in range(10):
	data.append(int(raw_input()))

data.sort(reverse = True)
print data[0]
print data[1]
print data[2] data = [] data [] for i in range(10):
	data.append(int(raw_input())) i range(10) range 10 data.append(int(raw_input())) data.append data append int(raw_input()) int raw_input() raw_input data.sort(reverse = True) data.sort data sort reverse = True reverse True print data[0] data 0 print data[1] data 1 print data[2] data 2 data = [] [] data
data = []

for i in range(10):
	data.append(int(raw_input()))

data.sort(reverse = True)
print data[0]
print data[1]
print data[2]