N = int(input())

AC=0
WA=0
TLE=0
RE=0

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

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