N = int(input())
ans = [0,0,0,0]
for _ in range(N):
    a = input()
    if a == 'AC':
        ans[0] += 1
    elif a == 'WA':
        ans[1] += 1
    elif a == 'TLE':
        ans[2] += 1
    elif a == 'RE':
        a[3] += 1
print('AC ×',ans[0])
print('WA ×',ans[1])
print('TLE ×',ans[2])
print('RE ×',ans[3])
