import sys 

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

N = int(readline())

cnt = [0]*4

for i in range(N):

    S = readline().decode().rstrip()

    if S == 'AC':

        cnt[0] +=1

    if S == 'WA':

        cnt[1] +=1

    if S == 'TLE':

        cnt[2] +=1

    if S == 'RE':

        cnt[3] +=1

print(('AC x '+str(cnt[0])))

print(('WA x '+str(cnt[1])))

print(('TLE x '+str(cnt[2])))

print(('RE x '+str(cnt[3])))
import sys 

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

N = int(readline())

S = read().decode().rstrip().split()

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

    print(("{0} x {1}".format(s,S.count(s))))
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(readline())
cnt = [0] * 4
for i in range(N):
    S = readline().decode().rstrip()
    if S == "AC":
        cnt[0] += 1
    if S == "WA":
        cnt[1] += 1
    if S == "TLE":
        cnt[2] += 1
    if S == "RE":
        cnt[3] += 1
print(("AC x " + str(cnt[0])))
print(("WA x " + str(cnt[1])))
print(("TLE x " + str(cnt[2])))
print(("RE x " + str(cnt[3])))

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(readline())
S = read().decode().rstrip().split()
for s in ["AC", "WA", "TLE", "RE"]:
    print(("{0} x {1}".format(s, S.count(s))))

-cnt = [0] * 4 -for i in range(N): -    S = readline().decode().rstrip() -    if S == "AC": -        cnt[0] += 1 -    if S == "WA": -        cnt[1] += 1 -    if S == "TLE": -        cnt[2] += 1 -    if S == "RE": -        cnt[3] += 1 -print(("AC x " + str(cnt[0]))) -print(("WA x " + str(cnt[1]))) -print(("TLE x " + str(cnt[2]))) -print(("RE x " + str(cnt[3]))) +S = read().decode().rstrip().split() +for s in ["AC", "WA", "TLE", "RE"]: +    print(("{0} x {1}".format(s, S.count(s))))