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