hash = {"A" => 1, "B" => 0, "C" => 0}
choice = []

while tmp = gets
  tmp = tmp.split(",").map(&:chomp)
  cng1 = hash[tmp[1]]
  cng2 = hash[tmp[0]]
  hash[tmp[1]] = cng1
  hash[tmp[0]] = cng2

  puts "#{hash} :: hash"
end

puts hash.select{|_,v| v == hash.values.max}.keys

