def main():

    N = int(eval(input()))

    di = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}



    for _ in range(N):

        di[eval(input())] += 1



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

        print(f"{k} x {v}")





if __name__ == "__main__":

    main()

import sys





def input(): return sys.stdin.readline().strip()





def main():

    N = int(eval(input()))

    di = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}



    for _ in range(N):

        di[eval(input())] += 1



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

        print(f"{k} x {v}")





if __name__ == "__main__":

    main()

def main():
    N = int(eval(input()))
    di = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
    for _ in range(N):
        di[eval(input())] += 1
    for k, v in list(di.items()):
        print(f"{k} x {v}")


if __name__ == "__main__":
    main()

import sys


def input():
    return sys.stdin.readline().strip()


def main():
    N = int(eval(input()))
    di = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
    for _ in range(N):
        di[eval(input())] += 1
    for k, v in list(di.items()):
        print(f"{k} x {v}")


if __name__ == "__main__":
    main()

+import sys + + +def input(): +    return sys.stdin.readline().strip() + +