import sys



readline = sys.stdin.readline

MOD = 10 ** 9 + 7

INF = float('INF')

sys.setrecursionlimit(10 ** 5)





def main():

    from collections import Counter

    n = int(readline())

    cnt = Counter()

    for i in range(n):

        s = eval(input())

        cnt[s] += 1



    print(("AC x {}".format(cnt["AC"])))

    print(("WA x {}".format(cnt["WA"])))

    print(("TLE x {}".format(cnt["TLE"])))

    print(("RE x {}".format(cnt["RE"])))





if __name__ == '__main__':

    main()

from collections import Counter



n = int(eval(input()))

s = [eval(input()) for _ in range(n)]

counter = Counter(s)

output = ['AC', 'WA', 'TLE', 'RE']



for key in output:

    print(f'{key} x {counter[key]}')

import sys

readline = sys.stdin.readline
MOD = 10**9 + 7
INF = float("INF")
sys.setrecursionlimit(10**5)


def main():
    from collections import Counter

    n = int(readline())
    cnt = Counter()
    for i in range(n):
        s = eval(input())
        cnt[s] += 1
    print(("AC x {}".format(cnt["AC"])))
    print(("WA x {}".format(cnt["WA"])))
    print(("TLE x {}".format(cnt["TLE"])))
    print(("RE x {}".format(cnt["RE"])))


if __name__ == "__main__":
    main()

from collections import Counter

n = int(eval(input()))
s = [eval(input()) for _ in range(n)]
counter = Counter(s)
output = ["AC", "WA", "TLE", "RE"]
for key in output:
    print(f"{key} x {counter[key]}")

-import sys +from collections import Counter -readline = sys.stdin.readline -MOD = 10**9 + 7 -INF = float("INF") -sys.setrecursionlimit(10**5) - - -def main(): -    from collections import Counter - -    n = int(readline()) -    cnt = Counter() -    for i in range(n): -        s = eval(input()) -        cnt[s] += 1 -    print(("AC x {}".format(cnt["AC"]))) -    print(("WA x {}".format(cnt["WA"]))) -    print(("TLE x {}".format(cnt["TLE"]))) -    print(("RE x {}".format(cnt["RE"]))) - - -if __name__ == "__main__": -    main() +n = int(eval(input())) +s = [eval(input()) for _ in range(n)] +counter = Counter(s) +output = ["AC", "WA", "TLE", "RE"] +for key in output: +    print(f"{key} x {counter[key]}")