a = int(input())
c['AC'] = c['WA'] = c['TLE'] = c['RE'] = 0
for _ in range(a):
  c[input()]+=1
print('AC x ', en = '')
print(c['AC'])

print('WA x ', en = '')
print(c['WA'])

print('TLE x ', en = '')
print(c['TLE'])

print('RE x ', en = '')
print(c['RE'])