n = int(input())
moji=[]
for i in range(n):
    m=str(input())
    moji.append(m)
cnt_AC =0
cnt_WA =0
cnt_TLE=0
cnt_RE=0
for i in range(n):
    if str('AC') == moji[i]:
        cnt_AC = cnt_AC + 1
    elif str('WA') == moji[i]:
        cnt_WA = cnt_WA + 1
    elif str('TLE') == moji[i]: 
        cnt_TLE = cnt_TLE + 1
    elif str('RE') == moji[i]:
        cnt_RE = cnt_RE + 1

print('AC ×',cnt_AC)
print('WA ×',cnt_WA)
print('TLE ×',cnt_TLE)
print('RE ×',cnt_RE)