#include <bits/stdc++.h>
int main(void) {
  int N, c0 = 0, c1 = 0, c2 = 0, c3 = 0;
  if ((scanf("%d", &N) != 1) || (N < 0 || 100000 < N)) return -1;
  char s[N][5];
  for (int i = 0; i < N; i++) {
    scanf("%s", s[i]);
    if (strcmp(s[i], "AC") == 0)
      c0++;
    else if (strcmp(s[i], "WA") == 0)
      c1++;
    else if (strcmp(s[i], "TLE") == 0)
      c2++;
    else if (strcmp(s[i], "RE") == 0)
      c3++;
    else
      return -1;
  }
  printf("AC×%d\nWA×%d\nTLE×%d\nRE×%d\n", c0, c1, c2, c3);
  return 0;
}
