# Judge Status Summary

N = int(input())
stringList = [input() for i in range(N)]

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


for j in range(N):
    if stringList[j] == 'AC':
        c0 = c0 + 1
    if stringList[j] == 'WA':
        c1 = c1 + 1
    if stringList[j] == 'TLE':
        c2 = c2 + 1
    if stringList[j] == 'RE':
        c3 = c3 + 1

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

