import sys
n=int(input())
AC=0
WA=0
TLE=0
RE=0
for i in range(n):
    moji=input()
    if moji =='AC':
        AC+=1
    elif moji =='WA':
        WA+=1
    elif moji =='TLE':
        TLE+=1
    else:
        RE+=1
A=[AC,WA,TLE,RE]
B=['AC','WA','TLE','RE']
for i in range(4):
    q=A[i]
    print(B[i],end='')
    print(' × ',end='')
    print(q)
    
