import collections
N=int(input())
S=['a']*N
for i in range(0,N):
    S[i]=input()
J=collections.Counter(S)
print('AC',J['AC'],sep=' × ')
print('WA',J['WA'],sep=' × ')
print('TLE',J['TLE'],sep=' × ')
print('RE',J['RE'],sep=' × ')