#include <bits/stdc++.h>
int main() {
  int N;
  scanf("%d", &N);
  char judge[N][4];
  char ac[4] = "AC";
  char wa[4] = "WA";
  char tle[4] = "TLE";
  char re[4] = "RE";
  int i, a = 0, w = 0, t = 0, r = 0;
  for (i = 0; i < N; i++) {
    scanf("%s", judge[i]);
    if (strcmp(judge[i], ac) == 0) {
      a++;
    } else if (strcmp(judge[i], wa) == 0) {
      w++;
    } else if (strcmp(judge[i], tle) == 0) {
      t++;
    } else if (strcmp(judge[i], re) == 0) {
      r++;
    }
  }
  printf("AC × %d\n", a);
  printf("WA × %d\n", w);
  printf("TLE × %d\n", t);
  printf("RE × %d", r);
  return 0;
}
