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

10.times{ 
	x = gets.to_i

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

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

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

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