import collections
N = int(input())
S = [input() for _ in range(N)]

 
print('AC', '×', S.count('AC'))
print('WA', '×', S.count('WA'))
print('TLE', '×', S.count('TLE'))
print('RE', '×', S.count('RE'))