class Hill
  attr_accessor :input

  def initialize(input)
    @input = input
  end

  def sort
    @input.split("\n").map(&:to_i).sort { |x, y| y <=> x }
  end

  def output
    sort[0..2].each { |i| puts i }
  end
end

a = []
while input = gets.chomp
  break if input.empty?
  a << input
end
Hill.new(a.join("\n")).output