n = int(input())
Sn = [input()for i in range(1,n+1)]

C0 = Sn.count('AC')
C1 = Sn.count('WA')
C2 = Sn.count('TLE')
C3 = Sn.count('RE')

print('AC × '+str(C0)+'\n')
print('WA × '+str(C1)+'\n')
print('TLE × '+str(C2)+'\n')
print('RE × '+str(C3)+'\n')