a=int(input())

b=0
c=0
d=0
e=0

for i in range(a):
  name=input()

  if name=='AC':
    b+=1
  elif name=='WA':
    c+=1
  elif name=='TLE':
    d+=1
  elif name=='RE':
    e+=1

print('AC × '+str(b))
print('WA × '+str(c))
print('TLE × '+str(d))
print('RE × '+str(e))