#!/usr/bin/ruby
# -*- coding: utf-8 -*-
=begin
Volume0-0001
=end
class Main

  def initialize
    f=[]
    0.upto(9){|i|
      f.push(fh.gets.to_i)
    }
    puts f.sort{|a,b|b<=>a}.take(3).map{|x|x.to_s}

  end

end


if $0 == __FILE__ then
  Main.new
end