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