n=int(input())
ans={'AC' : 0, 'WA' : 0, 'TLE' : 0, 'RE' : 0}
for i in range(n):
  s=input()
  ans[s]+=1
print('AC × ' + str(ans['AC']))
print('WA × ' + str(ans['WA']))
print('TLE × ' + str(ans['TLE']))
print('RE × ' + str(ans['RE']))