N = int(input())
S = []
for i in range(N):
  S.append(input())
 
A = S.count("AC")
B = S.count("WA")
C = S.count("TLE")
D = S.count("RE")
 
print("AC × "+str(A))
print("WA × "+str(B))
print("TLE × "+str(C))
print("RE × "+str(D))