h = []
10.times do |i|
  h[i] = gets.chomp.to_i
end
  max1 = 0
  max2 = 0
  max3 = 0
10.times do |i|
  if max1 <= h[i]
     max3 = max2
     max2 = max1
     max1 = h[i]
  elsif max2 <= h[i]
     max3 = max2
     max2 = h[i]
  elsif max3 <= h[i]
     max3 = h[i]
   end
  end
 puts max1
 puts max2
 puts max3