N= int(input())
S=[ input() for _ in range(N) ]

a=0
w=0
t=0
r=0

for i range(N):
  if S[i] =="AC":
    a+=1
  elif S[i] =="WA":
    w+=1
  elif S[i] =="TLE":
    t+=1
  elif S[i] =="RE":
    r+=1

print("AC × "+ str(a))
print("WA × "+ str(w))
print("TLE × "+ str(t))
print("RE × "+ str(r))
