#include <bits/stdc++.h>
int compare_int(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int compare_int2(const void *a, const void *b) { return *(int *)b - *(int *)a; }
int main(void) {
  int n;
  char c[4] = {'\0'};
  int aa = 0, aw = 0, at = 0, ar = 0;
  int i;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%s", c);
    if (strcmp(c, "AC") == 0) {
      aa++;
    } else if (strcmp(c, "WA") == 0) {
      aw++;
    } else if (strcmp(c, "TLE") == 0) {
      at++;
    } else {
      ar++;
    }
  }
  printf("AC × %d\nWA × %d\nTLE × %d\nRE × %d\n", aa, aw, at, ar);
  return 0;
}
