#!/usr/bin/ruby


hills = Array.new

ARGF.each_line do |line|
    line = line.chomp
    hills.push(line.to_i)
end

hills = hills.sort { |x,y| y <=> x}

hills = hills.slice(0, 3)

puts "#{hills.join("\n")}"