#include <bits/stdc++.h>
int main(void) {
  int i = 0, N;
  char s[4];
  char a[4] = "AC";
  char b[4] = "WA";
  char c[4] = "TLE";
  char d[4] = "RE";
  int c0 = 0, c1 = 0, c2 = 0, c3 = 0;
  scanf("%d", &N);
  while (i < N) {
    scanf("%s", s);
    if (strcmp(a, s) == 0)
      c0 = c0 + 1;
    else if (strcmp(b, s) == 0)
      c1 = c1 + 1;
    else if (strcmp(c, s) == 0)
      c2 = c2 + 1;
    else if (strcmp(d, s) == 0)
      c3 = c3 + 1;
    i = i + 1;
  }
  printf("AC × %d\n", c0);
  printf("WA × %d\n", c1);
  printf("TLE × %d\n", c2);
  printf("RE × %d\n", c3);
  return 0;
}
