num = int(input())
count = {"AC":0, "WA":0, "TLE":0, "RE":0}
 
for i in range(num):
  word = input()
  for (key , n) in count.items():
    if word == key:
      count[key] += 1
 
for (key , n) in count.items():
  print(key + " × " + str(n))