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