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
    else:
        C[3] += 1

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