import sys
input = sys.stdin.readline

N = int(input())

S = [input().replace('\n', '') for _ in range(N)]
print(S)

AC_c = 0
WA_c = 0
TLE_c = 0
RE_c = 0

r = {'AC': 0, 'WA': 0, 'TLE':0, 'RE':0}

for s in S:
    r[s] += 1

for k, v in r.items():
    print(f'{k} x {v}')
