import collections
N = int(input())
S = [input() for _ in range(N)]
c = collections.Counter(S)
 
print('AC', '×', c['AC'])
print('WA', '×', c['WA'])
print('TLE', '×', c['TLE'])
print('RE', '×', c['RE'])