N = int(input())
C = [0]*4
for i in range(N):
    S = input()
    if S == 'AC':
        C[0] += 1
    elif S == 'WA':
        C[1] += 1
    elif S == 'TLE':
        C[2] += 1
    elif S == 'RE':
        C[3] += 1

print('AC × '+str(C[0]))
print('WA × '+str(C[1]))
print('TLE × '+str(C[2]))
print('RE × '+str(C[3]))
