MOUNTAIN_NUM = 10
HIGHER_NUM = 3

mountain_arr = []
MOUNTAIN_NUM.times do
    mountain_arr << gets.to_i
end

mountain_arr.sort! { |a, b| b <=> a }

0.upto(HIGHER_NUM - 1) do |i|
    puts mountain_arr[i]
end