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