N=int(input())

AC=0
WA=0
TLE=0
RE=0

for i in range(N):
    j=input()
    if j=='AC': 
        AC+=1
    elif j=='WA':
        WA+=1
    elif j=='TLE':
        TLE+=1
    else:
        RE += 1

print('AC × {}'.format(AC))
print('WA × {}'.format(WA))
print('TLE × {}'.format(TLE))
print('RE × {}'.format(RE))