max_1 = 0
max_2 = 0
max_3 = 0

10.times do
  x = gets.chomp.to_i
  if x > max_3
    max_3 = x
    if max_3 > max_2
      max_2,max_3 = max_3,max_2
      if max_2 > max_1
        max_1,max_2 = max_2,max_1
      end
    end
  end
end

puts max_1
puts max_2
puts max_3