import collections

n=int(eval(input()))

s=[None]*n

for i in range(n):

    s[i]=eval(input())

c=collections.Counter(s)

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

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

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

print(("RE x " + str(c["RE"])))
import collections

import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

n=int(readline())

s=read().decode().splitlines()

c=collections.Counter(s)

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

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

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

print(("RE x " + str(c["RE"])))
import collections

n = int(eval(input()))
s = [None] * n
for i in range(n):
    s[i] = eval(input())
c = collections.Counter(s)
print(("AC x " + str(c["AC"])))
print(("WA x " + str(c["WA"])))
print(("TLE x " + str(c["TLE"])))
print(("RE x " + str(c["RE"])))

import collections
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
n = int(readline())
s = read().decode().splitlines()
c = collections.Counter(s)
print(("AC x " + str(c["AC"])))
print(("WA x " + str(c["WA"])))
print(("TLE x " + str(c["TLE"])))
print(("RE x " + str(c["RE"])))

+import sys -n = int(eval(input())) -s = [None] * n -for i in range(n): -    s[i] = eval(input()) +read = sys.stdin.buffer.read +readline = sys.stdin.buffer.readline +n = int(readline()) +s = read().decode().splitlines()