inputs = readlines

ac = wa = tle = re = 0
inputs.each do |i|
  case i[0]
  when 'A'
    ac += 1
  when 'W'
    wa += 1
  when 'T'
    tle += 1
  when 'R'
    re += 1
  end
end

puts "AC x " + ac.to_s
puts "WA x " + wa.to_s
puts "TLE x " + tle.to_s
puts "RE x " + re.to_s