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