n = gets.chomp.to_i
hash = {"AC"=>0, "WA" =>0, "TLE"=>0, "RE"=>0}
n.times do
  hash[gets.chomp] += 1
end

puts "AC × #{hash["AC"]}"
puts "WA × #{hash["WA"]}"
puts "TLE × #{hash["TLE"]}"
puts "RE × #{hash["RE"]}"