from collections import Counter

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

s = Counter(S)

print('AC×'+ str(s['AC']))
print('WA×' + str(s['WA']))
print('TLE×' + str(s['TLE']))
print('RE×' + str(s['RE']))