#include <bits/stdc++.h>
char judge[10000][4];
int main(void) {
  long long int N, i;
  char *s1 = "AC", *s2 = "WA", *s3 = "TLE", *s4 = "RE";
  int a = 0, w = 0, t = 0, r = 0;
  scanf("%lld", &N);
  for (i = 0; i < N; i++) {
    scanf("%s", judge[i]);
  }
  for (i = 0; i < N; i++) {
    if (strcmp(judge[i], s1) == 0) {
      a += 1;
    }
  }
  for (i = 0; i < N; i++) {
    if (strcmp(judge[i], s2) == 0) {
      w += 1;
    }
  }
  for (i = 0; i < N; i++) {
    if (strcmp(judge[i], s3) == 0) {
      t += 1;
    }
  }
  for (i = 0; i < N; i++) {
    if (strcmp(judge[i], s4) == 0) {
      r += 1;
    }
  }
  printf("AC × %d\n", a);
  printf("WA × %d\n", w);
  printf("TLE × %d\n", t);
  printf("RE × %d\n", r);
  return 0;
}
