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