N=int(input())
I=[]
for i in range(N):
    I.append(input())
a=0
b=0
c=0
d=0
for i in range(N):
    if I[i]=='AC':
        a+=1
    if I[i]=='WA':
        b+=1
    if I[i]=='TLE':
        c+=1
    if I[i]=='RE':
        d+=1
print('AC × '+str(a))
print('WA × '+str(b))
print('TLE × '+str(c))
print('RE × '+str(d))