@staticmethod
def b():
    (n, *s) = sys.stdin.read().split()
    c = Counter(s)
    for v in 'AC, WA, TLE, RE'.split(', '):
        print(f'{v} x {c[v]}')
@staticmethod
def b():
    (n, *s) = sys.stdin.read().split()
    c = Counter(s)
    for v in 'AC, WA, TLE, RE'.split(', '):
        print(f'{v} x {c[v]}')