from collections import Counter

N,S = int(input()),[]
for _ in range(N):
	S.append(input())
c = Counter(S)

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