def sort(ary)
    0.upto(8) {|num1|
        (num1+1).upto(9) {|num2|
            if ary[num1] < ary[num2]
                ary[num1], ary[num2] = ary[num2], ary[num1]
            end
        }
    }
    return ary[0], ary[1], ary[2]
end

height = []

for i in 0..9
    height[i] = gets.to_i
end

result = sort(height)
for i in 0..2
    puts "\n#{result[i]}"
end