N=int(input())
l=[]
for i in range(N):
  a=input()
  l.append(a)
AC_num=l.count("AC")
WA_num=l.count("WA")
TLE_num=l.count("TLE")
RE_num=l.count("RE")
print("AC ×",AC_num)
print("WA ×",WA_num)
print("TLE ×",TLE_num)
print("RE ×",RE_num)