N = int(input())
str_lis = []
C0 = 0
C1 = 0
C2 = 0
C3 = 0
for i in range(N):
  result = input()
  if result == "AC":
    C0 += 1
  elif result == "WA":
    C1 += 1
  elif result == "TLE":
    C2 += 1
  else:
    C3 += 1
    
print("AC × ", C0)
print("WA × ", C1)
print("TLE × ", C2)
print("RE × ", C3)