n = int(input())
result = ['AC','WA','TLE','RE']
c = [0]*4

for i in range(n):
    str = input()
    for n,r in enumerate(result):
        if str == r:
            c[n] += 1

for i in range(4):
    print(result[i], ' × ', c[i])