hills = [0,0,0] # top3 highest > higher > high 

10.times{ 
	x = gets.to_i


	if x > hills[2] 
		hills[0] = hills[1]
		hills[1] = hills[2]
		hills[2] = x

	elsif x > hills[1]
		hills[0] = hills[1]
		hills[1] = x

	elsif x > hills[0] 
		hills[0] = x
	end


}
3.times do |i|
	puts hills[2-i]
end