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

input = gets.chomp
Hill.new(input).output