N = int(input())
S = [input() for i in range(N)]
count_AC, count_WA, count_TLE, count_RE = 0, 0, 0, 0
for s in S:
    if s == 'AC':
        count_AC+=1
    elif s == 'WA':
        count_WA+=1
    elif s == 'TLE':
        count_TLE+=1
    else:
        count_RE+=1

print('AC × '+str(count_AC))
print('WA × '+str(count_WA))
print('TLE × '+str(count_TLE))
print('RE × '+str(count_RE))