N = int(input())
ans = {'AC':0,'WA':0,'TLE':0,'RE':0}
for i in range(N):
    a = input()
    if a in ans.keys():
        ans[a] +=1
    else:
        ans[a] = 1

for k,v in ans.items():
    print('{} × {}'.format(k,v))