n = int(input())
s = [input() for i in range(n)]
AC = 0
WA = 0
TLE = 0
RE = 0
for j in range(n):
  if s[j] == 'AC':
    AC += 1
  elif s[j] == 'WA':
    WA += 1
  elif s[j] == 'TLE':
    TLE += 1
  else:
    RE += 1
print('AC ×', AC)
print('WA ×', WA)
print('TLE ×', TLE)
print('RE ×', RE)