N = int(input())
cnt1 = 0
cnt2 = 0
cnt3 = 0
cnt4 = 0
for i in range(N):
  S = input()
  if S == 'AC':
    cnt1 += 1
  elif S == 'WA':
    cnt2 += 1
  elif S == 'TLE':
    cnt3 += 1
  else:
    cnt4 += 1
print( 'AC ×' + str(cnt1) )
print( 'WA ×' + str(cnt2) )
print( 'TLE ×' + str(cnt3) )
print( 'RE ×' + str(cnt4) )