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

for letter in receiveWord:
    if letter in searchWord:
        wordCountDict[letter] += 1
for key, value in wordCountDict.items():
    print(f'{key} × {value}')