N = int(input())
input_list = [input() for i in range(N)]
  
AC = 0
WA = 0
TLE = 0
RE = 0

for i in range(N):
  if input_list[i] == 'AC':
    AC += 1
  elif input_list[i] == 'WA':
    WA += 1
  elif input_list[i] == 'TLE':
    TLE += 1
  else:
    RE += 1
    
print('AC ×',AC)
print('WA ×',WA)
print('TLE ×',TLE)
print('RE ×',RE)
