ls=["AC","TLE","RE","WA"]
n=int(input())
a=b=c=d=0
for i in range(n):
  s=input()
  if s==ls[0]:
    a+=1
  elif s==ls[1]:
    b+=1
  elif s==ls[2]:
    c+=1
  else:
    d+=1

print("AC ×",a)
print("WA ×",d)
print("TLE ×",b)
print("RE ×",c)