n = int(input())
searchWord = ['AC','WA','TLE','RE']
wordCountDict = {letter : 0 for letter in searchWord}
for i in range(n):
    word = input()
    if word in searchWord:
        wordCountDict[word] += 1

for key, value in wordCountDict.items():
    print(f'{key} × {value}')