#include <bits/stdc++.h>
int main(void) {
  int c0 = 0, c1 = 0, c2 = 0, c3 = 0;
  int i, n;
  scanf("%d", &n);
  char s[7];
  char *b[] = {"AC", "WA", "TLE", "RE"};
  for (i = 0; i < n; i++) {
    scanf("%s", s);
    if (strcmp(s, b[0]) == 0)
      c0++;
    else if (strcmp(s, b[1]) == 0)
      c1++;
    else if (strcmp(s, b[2]) == 0)
      c2++;
    else if (strcmp(s, b[3]) == 0)
      c3++;
  }
  printf("AC × %d\nWA × %d\nTLE × %d\nRE × %d\n", c0, c1, c2, c3);
  return 0;
}
