class Mountain
    @data
    def initialize
        @data = []
        while input = gets
            @data << input.to_i
        end
    end
    def sort_data
        @data.sort!.reverse!
    end
    def get_data
        return @data
    end
end

class Main
    def run
        m = Mountain.new
        m.sort_data
        d = m.get_data
        flg = 0
        d.map{|hoge|
            flg = flg + 1
            p hoge
            if (flg == 3) 
                break
            end
        }
    end
end

Main.new.run;