#include <bits/stdc++.h>
int main(void) {
  int n, a = 0, b = 0, c = 0, d = 0;
  scanf("%d", &n);
  char s[5];
  char s1[4] = "AC";
  char s2[4] = "WA";
  char s3[4] = "TLE";
  char s4[4] = "RE";
  for (int i = 0; i < n; i++) {
    scanf("%s", &s);
    if (strcmp(s, s1) == 0) {
      a++;
    } else if (strcmp(s, s2) == 0) {
      b++;
    } else if (strcmp(s, s3) == 0) {
      c++;
    } else if (strcmp(s, s4) == 0) {
      d++;
    }
  }
  printf("AC × %d\nWA × %d\nTLE × %d\nRE × %d\n", a, b, c, d);
  return 0;
}
