from collections import Counter

N = int(input())

S = [input() for _ in range(N)]

C = Counter(S)

ans = ['AC x {}'.format(C['AC']),'WA x {}'.format(C['WA']),'TLE x {}'.format(C['TLE']),'RE x {}'.format(C['RE'])]

print(*ans, sep='\n')

N = int(eval(input()))

S = [eval(input()) for _ in range(N)]

lis = ['AC','WA','TLE','RE']

for l in lis:

  print(('{} x {}'.format(l,S.count(l))))
from collections import Counter

N = int(input())
S = [input() for _ in range(N)]
C = Counter(S)
ans = [
    "AC x {}".format(C["AC"]),
    "WA x {}".format(C["WA"]),
    "TLE x {}".format(C["TLE"]),
    "RE x {}".format(C["RE"]),
]
print(*ans, sep="\n")

N = int(eval(input()))
S = [eval(input()) for _ in range(N)]
lis = ["AC", "WA", "TLE", "RE"]
for l in lis:
    print(("{} x {}".format(l, S.count(l))))

-from collections import Counter - -N = int(input()) -S = [input() for _ in range(N)] -C = Counter(S) -ans = [ -    "AC x {}".format(C["AC"]), -    "WA x {}".format(C["WA"]), -    "TLE x {}".format(C["TLE"]), -    "RE x {}".format(C["RE"]), -] -print(*ans, sep="\n") +N = int(eval(input())) +S = [eval(input()) for _ in range(N)] +lis = ["AC", "WA", "TLE", "RE"] +for l in lis: +    print(("{} x {}".format(l, S.count(l))))