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

c0 = s.count('AC')
c1 = s.count('WA')
c2 = s.count('TLE')
c3 = s.count('RE')

print('AC ×', c0)
print('WA ×', c1)
print('TLE ×', c2)
print('RE ×', c3)