n = int(eval(input()))

s = [eval(input()) for _ in range(n)]

from collections import Counter

c = Counter(s)



if 'AC' in list(c.keys()):

    print(('AC x', c['AC']))

else:

    print('AC x 0')

if 'WA' in list(c.keys()):

    print(('WA x', c['WA']))

else:

    print('WA x 0')

if 'TLE' in list(c.keys()):

    print(('TLE x', c['TLE']))

else:

    print('TLE x 0')

if 'RE' in list(c.keys()):

    print(('RE x', c['RE']))

else:

    print('RE x 0')

from collections import defaultdict

n = int(eval(input()))

d = defaultdict(int)

for i in range(n):

    d[eval(input())] += 1

for v in ['AC', 'WA', 'TLE', 'RE']:

    print((v, 'x', d[v]))
n = int(eval(input()))
s = [eval(input()) for _ in range(n)]
from collections import Counter

c = Counter(s)
if "AC" in list(c.keys()):
    print(("AC x", c["AC"]))
else:
    print("AC x 0")
if "WA" in list(c.keys()):
    print(("WA x", c["WA"]))
else:
    print("WA x 0")
if "TLE" in list(c.keys()):
    print(("TLE x", c["TLE"]))
else:
    print("TLE x 0")
if "RE" in list(c.keys()):
    print(("RE x", c["RE"]))
else:
    print("RE x 0")

from collections import defaultdict

n = int(eval(input()))
d = defaultdict(int)
for i in range(n):
    d[eval(input())] += 1
for v in ["AC", "WA", "TLE", "RE"]:
    print((v, "x", d[v]))

+from collections import defaultdict + -s = [eval(input()) for _ in range(n)] -from collections import Counter - -c = Counter(s) -if "AC" in list(c.keys()): -    print(("AC x", c["AC"])) -else: -    print("AC x 0") -if "WA" in list(c.keys()): -    print(("WA x", c["WA"])) -else: -    print("WA x 0") -if "TLE" in list(c.keys()): -    print(("TLE x", c["TLE"])) -else: -    print("TLE x 0") -if "RE" in list(c.keys()): -    print(("RE x", c["RE"])) -else: -    print("RE x 0") +d = defaultdict(int) +for i in range(n): +    d[eval(input())] += 1 +for v in ["AC", "WA", "TLE", "RE"]: +    print((v, "x", d[v]))