from collections import Counter
import sys

sys.setrecursionlimit(10 ** 6)

mod = 1000000007
inf = int(1e18)

dx = [0, 1, 0, -1]
dy = [1, 0, -1, 0]


def inverse(a):
    return pow(a, mod - 2, mod)


def usearch(x, a):
    lft = 0
    rgt = len(a) + 1
    while rgt - lft > 1:
        mid = (rgt + lft) // 2
        if a[mid] <= x:
            lft = mid
        else:
            rgt = mid
    return lft



def main():
    n = int(input())
    s = [input() for i in range(n)]
    r = {}
    for x in s:
        r[x] = r.get(x, 0) + 1

    for i in ['AC', 'WA', "TLE", "E"]:
        print("{} x {}".format(i, r.get(i, 0)))

main()
