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

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

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

