N = int(input())
i = 1
cnt_ac = 0
cnt_wa = 0
cnt_tle = 0
cnt_re = 0

while i <= N:
  s = input()
  if s == 'AC':
    cnt_ac += 1
  elif s == 'WA':
    cnt_wa += 1
  elif s == 'TLE':
    cnt_tle += 1
  elif s == 'RE':
    cnt_re += 1

print('AC ×　' + str(cnt_ac))
print('WA ×　' + str(cnt_wa))
print('TLE ×　' + str(cnt_tle))
print('RE ×　' + str(cnt_re))
