from sys import stdin


n, *s = (x.rstrip() for x in stdin.readlines())

ac = s.count('AC')
wa = s.count('WA')
tle = s.count('TLE')
re = s.count('RE')

print(f'AC × {ac}')
print(f'WA × {wa}')
print(f'TLE × {tle}')
print(f'RE × {re}')
