heightOfMountains = []
for i in range(1, 11):
	heightOfMountains.append(int(input()))
heightOfMountains.sort()
for i in range(1, 4):
	print(heightOfMountains[-i]) heightOfMountains = [] heightOfMountains [] for i in range(1, 11):
	heightOfMountains.append(int(input())) i range(1, 11) range 1 11 heightOfMountains.append(int(input())) heightOfMountains.append heightOfMountains append int(input()) int input() input heightOfMountains.sort() heightOfMountains.sort heightOfMountains sort for i in range(1, 4):
	print(heightOfMountains[-i]) i range(1, 4) range 1 4 print(heightOfMountains[-i]) print heightOfMountains[-i] heightOfMountains -i i heightOfMountains = [] [] heightOfMountains
heightOfMountains = []
for i in range(1, 11):
	heightOfMountains.append(int(input()))
heightOfMountains.sort()
for i in range(1, 4):
	print(heightOfMountains[-i])