N = int(eval(input()))

S = list(str(eval(input())) for _ in range(N))



AC = 0

WA = 0

TLE = 0

RE = 0

for s in S:

    if s =='AC':

        AC +=1

    elif s == 'WA':

        WA +=1

    elif s == 'TLE':

        TLE += 1

    elif s == 'RE':

        RE  +=1



print(('AC x {}'.format(str(AC))))

print(('WA x {}'.format(str(WA))))

print(('TLE x {}'.format(str(TLE))))

print(('RE x {}'.format(str(RE))))
from collections import Counter

n = int(eval(input()))

a = list(eval(input()) for _ in range(n))

c = Counter(a)



print(('AC x '+str(c['AC'])))

print(('WA x '+str(c['WA'])))

print(('TLE x '+str(c['TLE'])))

print(('RE x '+str(c['RE'])))

N = int(eval(input()))
S = list(str(eval(input())) for _ in range(N))
AC = 0
WA = 0
TLE = 0
RE = 0
for s in S:
    if s == "AC":
        AC += 1
    elif s == "WA":
        WA += 1
    elif s == "TLE":
        TLE += 1
    elif s == "RE":
        RE += 1
print(("AC x {}".format(str(AC))))
print(("WA x {}".format(str(WA))))
print(("TLE x {}".format(str(TLE))))
print(("RE x {}".format(str(RE))))

from collections import Counter

n = int(eval(input()))
a = list(eval(input()) for _ in range(n))
c = Counter(a)
print(("AC x " + str(c["AC"])))
print(("WA x " + str(c["WA"])))
print(("TLE x " + str(c["TLE"])))
print(("RE x " + str(c["RE"])))

-N = int(eval(input())) -S = list(str(eval(input())) for _ in range(N)) -AC = 0 -WA = 0 -TLE = 0 -RE = 0 -for s in S: -    if s == "AC": -        AC += 1 -    elif s == "WA": -        WA += 1 -    elif s == "TLE": -        TLE += 1 -    elif s == "RE": -        RE += 1 -print(("AC x {}".format(str(AC)))) -print(("WA x {}".format(str(WA)))) -print(("TLE x {}".format(str(TLE)))) -print(("RE x {}".format(str(RE)))) +from collections import Counter + +n = int(eval(input())) +a = list(eval(input()) for _ in range(n)) +c = Counter(a) +print(("AC x " + str(c["AC"]))) +print(("WA x " + str(c["WA"]))) +print(("TLE x " + str(c["TLE"]))) +print(("RE x " + str(c["RE"])))