blood = []
while input = gets
  a, b = input.chop.split(",")
  blood.push(b)
end
result = blood.inject(Hash.new(0)){|count,i| count[i] += 1; count}.sort
result[1], result[2] = result[2], result[1]
puts Hash[*result.flatten].values
