height_a, height_b, height_c = gets.chomp.to_i, gets.chomp.to_i, gets.chomp.to_i heights = {:A => height_a, :B => height_b, :C => height_c} res = heights.sort{|(k1, v1), (k2, v2)| v2 <=> v1 } res.to_h.each_key{|key| puts key}