N=int(input())
str_list = [input() for _ in range(N)]
AC=WA=TLE=RE=0
for i in range(N):
  if(str_list[i]=="AC"):
    AC+=1
  if(str_list[i]=="TLE"):
    TLE+=1
  if(str_list[i]=="WA"):
    WA+=1
  if(str_list[i]=="RE"):
    RE+=1
print('AC × '+str(AC))
print('WA × '+str(WA))
print('TLE × '+str(TLE))
print('RE × '+str(RE))

  