N = int(input())
ac, re, wa, tle = 0,0,0,0
for i in range(N):
  line = input()
  if line == "AC":
    ac += 1
  elif line == "TLE":
    tle += 1
  elif line == "WA":
    wa += 1
  elif line == "RE":
    re += 1
print("AC × " + str(ac))
print("WA × " + str(wa))
print("TLE × " + str(tle))
print("RE × " + str(re))