num = Array.new num[0] = gets.to_i num[1] = gets.to_i num[2] = gets.to_i hashMen = { "A" => num[0], "B" => num[1], "C" => num[2] } hashMen= Hash[ hashMen.sort_by{|_, v| -v}] hashMen.each do |k, v| puts k end