IN = [input() for i in range(1)]
N = int(IN[0])
INP = [input() for i in range(int(N))]
AC = 0
WA = 0
TLE = 0
RE = 0
i = 0

while i < N:
  if INP[i] == "AC":
    AC = AC + 1
    i = i + 1
  elif INP[i] == "WA":
    WA = WA + 1
    i = i + 1
  elif INP[i] == "TLE":
    TLE = TLE + 1
    i = i + 1
  elif INP[i] == "RE":
    RE = RE + 1
    i = i + 1
  else:
    i = i + 1

print("AC × " + str(AC))
print("WA × " + str(WA))
print("TLE × " + str(TLE))
print("RE × " + str(RE))
	