N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0

for i in range(N):
  s = input()
  if s == "AC":
    AC += 1
  elif s == "WA":
    WA += 1
  elif s == "TLE":
    TLE +=1
  else:
    RE += 1
    
print("AC × " + str(AC))
print("WA × " + str(WA))
print("TLE × " + str(TLE))
print("RE × " + str(RE))