n=int(input())
word_list = ['AC','WA','TLE','RE']
A = 0
W = 0
T = 0
R = 0

for i in range(n):
    s = input()
    if s == 'AC':
        A = A + 1
    elif s == 'WA':
        W = W + 1
    elif s == 'TLE':
        T = T + 1
    else:
        R = R + 1
Ans_list = [A,W,T,R]
for i in range(4):
    print(str(word_list[i])+ ' × '+ str(Ans_list[i]))