n = int(input())

c0 = 0
c1 = 0
c2 = 0
c3 = 0

for i in range(n):
    a = input()
    if(a == 'AC'):
        c0 += 1
    elif(a == 'WA'):
        c1 += 1
    elif(a == 'TLE'):
        c2 += 1
    elif(a == 'RE'):
        c3 += 1

print('AC×' + str(c0))
print('WA×' + str(c1))
print('TLE×' + str(c2))
print('RE×' + str(c3))

