import sys
import math
from collections import deque
from collections import defaultdict
from copy import deepcopy
from itertools import accumulate #リストを与えると累積和を返す
def input(): return sys.stdin.readline().rstrip()
from functools import lru_cache #メモ化

def main():
    n = int(input())
    s = [input() for _ in range(n)]
    print('AC × {:}'.format(s.count('AC')))
    print('WA × {:}'.format(s.count('WA')))
    print('TLE × {:}'.format(s.count('TLE')))
    print('RE × {:}'.format(s.count('RE')))
    return 0

if __name__ == "__main__":
    main()