from collections import Counter

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

s = Counter(S)

print('AC × ',end='')
print(s['AC'])
print('WA × ', end='')
print(s['WA'])
print('TLE × ',end='')
print(s['TLE'])
print('RE × ', end='')
print(s['RE'])