from collections import defaultdict as d
from itertools import combinations as c
from string import ascii_lowercase as a

n = int(input())
dd = d(int)
for i in range(n):
	e = input()
	dd[e] += 1
print('AC x', dd['AC'])
print('WA x', dd['AC'])
print('TLE x', dd['AC'])
print('RE x', dd['AC'])