a,b,c,d=0,0,0,0
N=int(input())
S=[input() for _ in range(N)]
for i in range(N):
    if S[i]=='AC':
        a=a+1
    elif S[i]=='WA':
        b=b+1
    elif S[i]=='TLE':
        c=c+1
    elif S[i]=='RE':
        d=d+1
print('AC x',a)        
print('WA ×',b)    
print('TLE ×',c)       
print('RE ×',d)  