count = {'AC' : 0,'WA' : 0,'TLE': 0,'RE' : 0 }
n = int(input)
for i in range(0,n):
  count[input()]+=1
ptrint('AC x '+count['AC'])
ptrint('WA x '+count['WA'])
ptrint('TLE x '+count['TLE'])  
ptrint('RE x '+count['RE'])