import sys

read = sys.stdin.read

readline = sys.stdin.readline

readlines = sys.stdin.readlines



def main():

    N = int(readline())



    d = {}

    d["AC"] = 0

    d["WA"] = 0

    d["TLE"] = 0

    d["RE"] = 0



    for _ in range(N):

        s = readline().strip()

        d[s] += 1



    print(f"AC x {d['AC']}")

    print(f"WA x {d['WA']}")

    print(f"TLE x {d['TLE']}")

    print(f"RE x {d['RE']}")





if __name__ == "__main__":

    main()

from collections import Counter

import sys

read = sys.stdin.read

readline = sys.stdin.readline

readlines = sys.stdin.readlines



def main():

    N, *S = read().split() 

    

    d = Counter(S)

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

        if result in d:

            print(f"{result} x {d[result]}")

        else:

            print(f"{result} x 0")





if __name__ == "__main__":

    main()

import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines


def main():
    N = int(readline())
    d = {}
    d["AC"] = 0
    d["WA"] = 0
    d["TLE"] = 0
    d["RE"] = 0
    for _ in range(N):
        s = readline().strip()
        d[s] += 1
    print(f"AC x {d['AC']}")
    print(f"WA x {d['WA']}")
    print(f"TLE x {d['TLE']}")
    print(f"RE x {d['RE']}")


if __name__ == "__main__":
    main()

from collections import Counter
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines


def main():
    N, *S = read().split()
    d = Counter(S)
    for result in ["AC", "WA", "TLE", "RE"]:
        if result in d:
            print(f"{result} x {d[result]}")
        else:
            print(f"{result} x 0")


if __name__ == "__main__":
    main()

+from collections import Counter -    N = int(readline()) -    d = {} -    d["AC"] = 0 -    d["WA"] = 0 -    d["TLE"] = 0 -    d["RE"] = 0 -    for _ in range(N): -        s = readline().strip() -        d[s] += 1 -    print(f"AC x {d['AC']}") -    print(f"WA x {d['WA']}") -    print(f"TLE x {d['TLE']}") -    print(f"RE x {d['RE']}") +    N, *S = read().split() +    d = Counter(S) +    for result in ["AC", "WA", "TLE", "RE"]: +        if result in d: +            print(f"{result} x {d[result]}") +        else: +            print(f"{result} x 0")