# import time

# t1=time.time()

def LI():return list(map(int,input().split()))

def I(): return int(eval(input()))

from collections import deque, Counter, defaultdict

from heapq import heappop, heappush

# from pprint import pprint

# import numpy as np



n=I()

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

sc=Counter(s)

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

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

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

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

from collections import Counter

n=int(eval(input()))

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

sc=Counter(s)

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

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

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

print(("RE x {}".format(sc["RE"])))
# import time
# t1=time.time()
def LI():
    return list(map(int, input().split()))


def I():
    return int(eval(input()))


from collections import deque, Counter, defaultdict
from heapq import heappop, heappush

# from pprint import pprint
# import numpy as np
n = I()
s = [eval(input()) for _ in range(n)]
sc = Counter(s)
print(("AC x {}".format(sc["AC"])))
print(("WA x {}".format(sc["WA"])))
print(("TLE x {}".format(sc["TLE"])))
print(("RE x {}".format(sc["RE"])))

from collections import Counter

n = int(eval(input()))
s = [eval(input()) for _ in range(n)]
sc = Counter(s)
print(("AC x {}".format(sc["AC"])))
print(("WA x {}".format(sc["WA"])))
print(("TLE x {}".format(sc["TLE"])))
print(("RE x {}".format(sc["RE"])))

-# import time -# t1=time.time() -def LI(): -    return list(map(int, input().split())) +from collections import Counter - -def I(): -    return int(eval(input())) - - -from collections import deque, Counter, defaultdict -from heapq import heappop, heappush - -# from pprint import pprint -# import numpy as np -n = I() +n = int(eval(input()))