n = int(input())
a = 0
b = 0
c = 0
d = 0
for _ in range(n):
  i = input()
  if i == 'AC':
    a+=1
  if i == 'WA':
    b +=1
  if i == 'TLE':
    c +=1
  if i == 'RE':
    d+=1
print('AC × '+str(a))
print('WA × '+str(b))
print('TLE × '+str(c))
print('RE × '+str(d))
    