N = int(input())
x = ""
S = []
for i in range(N):
    x = input()
    S.append(x)
ans = [0]*4
for i in range(N):
    if S[i] == "AC":
        ans[0] += 1
    elif S[i] == "WA":
        ans[1] += 1
    elif S[i] == "TLE":
        ans[2] += 1
    elif S[i] == "RE":
        ans[3] += 1
print('AC × ',end='')
print(ans[0])
print('WA × ',end='')
print(ans[1])
print('TLE × ',end='')
print(ans[2])
print('RE × ',end='')
print(ans[3])
