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