N = int(eval(input()))



R = ["AC", "WA", "TLE", "RE"]

C = [0, 0, 0, 0]



for i in range(N):

    S = eval(input())

    if S == R[0]:

        C[0] += 1

    elif S == R[1]:

        C[1] += 1

    elif S == R[2]:

        C[2] += 1

    elif S == R[3]:

        C[3] += 1



for i in range(len(C)):

    print((R[i], "x", C[i]))
N = int(eval(input()))

s = [eval(input()) for v in range(N)]

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

    print(("{0} x {1}".format(v, s.count(v))))
N = int(eval(input()))
R = ["AC", "WA", "TLE", "RE"]
C = [0, 0, 0, 0]
for i in range(N):
    S = eval(input())
    if S == R[0]:
        C[0] += 1
    elif S == R[1]:
        C[1] += 1
    elif S == R[2]:
        C[2] += 1
    elif S == R[3]:
        C[3] += 1
for i in range(len(C)):
    print((R[i], "x", C[i]))

N = int(eval(input()))
s = [eval(input()) for v in range(N)]
for v in ["AC", "WA", "TLE", "RE"]:
    print(("{0} x {1}".format(v, s.count(v))))

-R = ["AC", "WA", "TLE", "RE"] -C = [0, 0, 0, 0] -for i in range(N): -    S = eval(input()) -    if S == R[0]: -        C[0] += 1 -    elif S == R[1]: -        C[1] += 1 -    elif S == R[2]: -        C[2] += 1 -    elif S == R[3]: -        C[3] += 1 -for i in range(len(C)): -    print((R[i], "x", C[i])) +s = [eval(input()) for v in range(N)] +for v in ["AC", "WA", "TLE", "RE"]: +    print(("{0} x {1}".format(v, s.count(v))))