n = int(input())
s = []
c1 = 0 
c2 = 0
c3 = 0
c4 = 0
for i in range(n):
    s.append(input()) 
    if s[i] == 'AC':
        c1 += 1
    elif s[i] == 'WA':
        c2 += 1
    elif s[i] == 'TLE':
        c3 += 1
    elif s[i] == 'RE':
        c4 += 1

print('AC ×',c1)
print('WA ×',c2)
print('TLE ×',c3)
print('RE ×',c4)