import sys

read = sys.stdin.read

readline = sys.stdin.readline

from itertools import accumulate

from collections import deque

from math import sqrt

from collections import defaultdict

def main():

    n = int(input())

    cnt = defaultdict(int)

    for _ in range(n):

        s = input()

        cnt[s] += 1

    print('AC x ', end='')

    print(cnt['AC'])

    print('WA x ', end='')

    print(cnt['WA'])

    print('TLE x ', end='')

    print(cnt['TLE'])

    print('RE x ', end='')

    print(cnt['RE'])

if __name__ == '__main__':

    main()

import sys

read = sys.stdin.read

readline = sys.stdin.readline

readlines = sys.stdin.readlines

from collections import Counter

def main():

    n = int(eval(input()))

    d1 = {'AC':0, 'WA':0, 'TLE': 0,'RE':0}

    s = []

    for _ in range(n):

        s.append(eval(input()))

    sa = Counter(s)

    for k, v in list(sa.items()):

        d1[k] += v

    print(('AC x', d1['AC']))

    print(('WA x', d1['WA']))

    print(('TLE x', d1['TLE']))

    print(('RE x', d1['RE']))



if __name__ == '__main__':

    main()

import sys

read = sys.stdin.read
readline = sys.stdin.readline
from itertools import accumulate
from collections import deque
from math import sqrt
from collections import defaultdict


def main():
    n = int(input())
    cnt = defaultdict(int)
    for _ in range(n):
        s = input()
        cnt[s] += 1
    print("AC x ", end="")
    print(cnt["AC"])
    print("WA x ", end="")
    print(cnt["WA"])
    print("TLE x ", end="")
    print(cnt["TLE"])
    print("RE x ", end="")
    print(cnt["RE"])


if __name__ == "__main__":
    main()

import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
from collections import Counter


def main():
    n = int(eval(input()))
    d1 = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
    s = []
    for _ in range(n):
        s.append(eval(input()))
    sa = Counter(s)
    for k, v in list(sa.items()):
        d1[k] += v
    print(("AC x", d1["AC"]))
    print(("WA x", d1["WA"]))
    print(("TLE x", d1["TLE"]))
    print(("RE x", d1["RE"]))


if __name__ == "__main__":
    main()

-from itertools import accumulate -from collections import deque -from math import sqrt -from collections import defaultdict +readlines = sys.stdin.readlines +from collections import Counter -    n = int(input()) -    cnt = defaultdict(int) +    n = int(eval(input())) +    d1 = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0} +    s = [] -        s = input() -        cnt[s] += 1 -    print("AC x ", end="") -    print(cnt["AC"]) -    print("WA x ", end="") -    print(cnt["WA"]) -    print("TLE x ", end="") -    print(cnt["TLE"]) -    print("RE x ", end="") -    print(cnt["RE"]) +        s.append(eval(input())) +    sa = Counter(s) +    for k, v in list(sa.items()): +        d1[k] += v +    print(("AC x", d1["AC"])) +    print(("WA x", d1["WA"])) +    print(("TLE x", d1["TLE"])) +    print(("RE x", d1["RE"]))