N = int(input())

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

output = [0]*4



for _ in range(N):

    S = input()

    if S == out[0]:

        output[0] += 1

    elif S == out[1]:

        output[1] += 1

    elif S == out[2]:

        output[2] += 1

    else:

        output[3] += 1



print(out[0],"x",output[0])

print(out[1],"x",output[1])

print(out[2],"x",output[2])

print(out[3],"x",output[3],end="")

N = int(eval(input()))

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

output = [0]*4



for _ in range(N):

    S = eval(input())

    if S == out[0]:

        output[0] += 1

    elif S == out[1]:

        output[1] += 1

    elif S == out[2]:

        output[2] += 1

    else:

        output[3] += 1



for i in range(4):

    print((out[i],"x",output[i]))
N = int(input())
out = ["AC", "WA", "TLE", "RE"]
output = [0] * 4
for _ in range(N):
    S = input()
    if S == out[0]:
        output[0] += 1
    elif S == out[1]:
        output[1] += 1
    elif S == out[2]:
        output[2] += 1
    else:
        output[3] += 1
print(out[0], "x", output[0])
print(out[1], "x", output[1])
print(out[2], "x", output[2])
print(out[3], "x", output[3], end="")

N = int(eval(input()))
out = ["AC", "WA", "TLE", "RE"]
output = [0] * 4
for _ in range(N):
    S = eval(input())
    if S == out[0]:
        output[0] += 1
    elif S == out[1]:
        output[1] += 1
    elif S == out[2]:
        output[2] += 1
    else:
        output[3] += 1
for i in range(4):
    print((out[i], "x", output[i]))

-N = int(input()) +N = int(eval(input())) -    S = input() +    S = eval(input()) -print(out[0], "x", output[0]) -print(out[1], "x", output[1]) -print(out[2], "x", output[2]) -print(out[3], "x", output[3], end="") +for i in range(4): +    print((out[i], "x", output[i]))