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

cnt_AC = s.count('AC')
cnt_WC = s.count('WA')
cnt_TLE = s.count('TLE')
cnt_RE = s.count('RE')

print(f'AC×{cnt_AC}')
print(f'WA×{cnt_WC}')
print(f'TLE×{cnt_TLE}')
print(f'RE×{cnt_RE}')

