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

c = collections.Counter(S)

print('AC × %d' % c['AC'])
print('WA × %d' % c['WA'])
print('TLE × %d' % c['TLE'])
print('RE × %d' % c['RE'])