# -*- config: utf-8 -*-
if __name__ == '__main__':
	hills = []
	for i in range(10):
		tmp = raw_input()
		hills.append(int(tmp))
	hills.sort(reverse=True)

	for i in range(3):
		print hills[i] if __name__ == '__main__':
	hills = []
	for i in range(10):
		tmp = raw_input()
		hills.append(int(tmp))
	hills.sort(reverse=True)

	for i in range(3):
		print hills[i] __name__ == '__main__' __name__ '__main__' hills = [] hills [] for i in range(10):
		tmp = raw_input()
		hills.append(int(tmp))
	 i range(10) range 10 tmp = raw_input() tmp raw_input() raw_input hills.append(int(tmp)) hills.append hills append int(tmp) int tmp hills.sort(reverse=True) hills.sort hills sort reverse=True reverse True for i in range(3):
		print hills[i] i range(3) range 3 print hills[i] hills i hills = [] [] hills tmp = raw_input() raw_input() tmp
# -*- config: utf-8 -*-
if __name__ == '__main__':
	hills = []
	for i in range(10):
		tmp = raw_input()
		hills.append(int(tmp))
	hills.sort(reverse=True)

	for i in range(3):
		print hills[i]