N = int(input())

result=[0,0,0,0]

for i in range(N):
  S=input()
  if S == "AC":
    result[0] += 1
  elif S == "WA":
    result[1] += 1
  elif S == "TLE":
    result[2] += 1
  else:
    result[3] += 1

print("AC × " + str(result[0]))
print("WA × " + str(result[1]))
print("TLE × " + str(result[2]))
print("RE × " + str(result[3]))