numMountains = 10
mountain = Array.new(numMountains).fill(0, 0...numMountains)

for i in 0...numMountains
  mountain[i] = gets.to_i
end

mountain.sort!{
  |x, y|  y.to_i <=> x.to_i
}

for i in 0...3
  puts mountain[i]
end