h = []
10.times do |i|
  h[i] = gets.chomp.to_i
end

p h
  max1 = h[0]
  max2 = h[0]
  max3 = h[0]
9.times do |i|
  if max1 < h[i]
     max3 = max2
     max2 = max1
     max1 = h[i]
  elsif max2 < h[i] && max1 > h[i]
     max3 = max2
     max2 = h[i]
  elsif max3 < h[i] && max2 > h[i]
   end
  end
 p max1
 p max2
 p max3