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