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