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