list = []
words = ['AC','WA','TLE','RE']
words_count = {'AC':0,'WA':0,'TLE':0,'RE':0}
    
try:
    while True:
      val = input()
      if val:
        list.append(val)
      else:
        break
except EOFError:
    pass

for i in range(1,len(list)):
  for word in words:
    if list[i] == word:
      words_count[word] += 1

for k,v in words_count.items():
  print("{key} × {value}".format(key = k,value= v))
  	