n = int(input())
s = list(map(int, input().split()))
a = 0
w = 0
t = 0
r = 0

for i in range(n):
  if s == "AC":
    a += 1
  elif s== "WA":
    w += 1
  elif s== "TLE":
    t += 1
  else:
    e += 1
  
  print("AC ×", a)
  print("WA ×", w)
  print("TLE ×", t)
  print("RE ×", r)