#include <bits/stdc++.h>
int main(void) {
  int a = 0;
  int b = 0;
  int c = 0;
  int d = 0;
  int N;
  int i = 0;
  char *A = "AC";
  char *B = "WA";
  char *C = "TLE";
  char *D = "RE";
  scanf("%d", &N);
  while (i < N) {
    char str[3];
    scanf("%s", str);
    if (strncmp(A, str, 3) == 0) {
      a++;
    } else if (strncmp(B, str, 3) == 0) {
      b++;
    } else if (strncmp(C, str, 3) == 0) {
      c++;
    } else if (strncmp(D, str, 3) == 0) {
      d++;
    }
    i++;
  }
  printf("AC × %d\n", a);
  printf("WA × %d\n", b);
  printf("TLE × %d\n", c);
  printf("RE × %d\n", d);
}
