n=int(input())
a=0
b=0
c=0
d=0
for i in range(n):
    s=input()
    a+=s.count('AC')
    b+=s.count('WA')
    c+=s.count('TLE')
    d+=s.count('RE')
print('AC × '+str(a))
print('WA × '+str(b))
print('TLE × '+str(c))
print('RE × '+str(d))
