N=int(input())
lis=[0,0,0,0]
for i in range(N):
  tmp=input()
  if tmp=="AC":
    lis[0]+=1
  elif tmp=="WA":
    lis[1]+=1
  elif tmp=="TLE":
    lis[2]+=1
  else:
    lis[3]+=1
print("AC × "+str(lis[0]))
print("WA × "+str(lis[1]))
print("TLE × "+str(lis[2]))
print("RE × "+str(lis[3]))