FAST_IO = 1
if FAST_IO:
    import io, sys, atexit
    rr = iter(sys.stdin.read().splitlines()).next
    sys.stdout = _OUTPUT_BUFFER = io.BytesIO()

    @atexit.register
    def write():
        sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
else:
    rr = raw_input
rri = lambda: int(rr())
rrm = lambda: map(int, rr().split())
rrmm = lambda n: [rrm() for _ in xrange(n)]


N = rri()
dic = {}
for i in range(N):
    tye = rr()
    dic[tye] = dic.get(tye, 0)+1
for tye in ("AC", "WA", "TLE", "RE"):
    print("{} x {}".format(tye, dic.get(tye, 0)))
'''
 AC x 3
WA x 1
TLE x 2
RE x 0

'''