from collections import Counter
li=[]
for i in range(int(input()):
	li.append(input())  
d=Counter(li)
print('AC','x',d['AC'])
print('WA','x',d['WA'])
print('TLE','x',d['TLE'])
print('RE','x',d['RE'])