n = int(input())
s = [input() for _ in range(n)]

cnt_ac = s.count('AC')
cnt_wa = s.count('WA')
cnt_tle = s.count('TLE')
cnt_re = s.count('RE')

print(f'AC×{cnt_ac}')
print(f'WA×{cnt_wa}')
print(f'TLE×{cnt_tle}')
print(f'RE×{cnt_re}')


