#include <bits/stdc++.h>
int main(void) {
  char judge[4][4] = {"AC", "WA", "TLE", "RE"};
  int AC_count = 0;
  int WA_count = 0;
  int TLE_count = 0;
  int RE_count = 0;
  int i, n;
  int count = 0;
  if (scanf("%d", &n) == 1)
    ;
  char str[n][4];
  for (i = 0; count < n; i++) {
    if (scanf("%s", str[i]) == 1)
      ;
    if (strcmp(str[i], judge[0]) == 0) {
      AC_count++;
    } else if (strcmp(str[i], judge[1]) == 0) {
      WA_count++;
    } else if (strcmp(str[i], judge[2]) == 0) {
      TLE_count++;
    } else if (strcmp(str[i], judge[3]) == 0) {
      RE_count++;
    }
    count++;
  }
  printf("AC × %d\n", AC_count);
  printf("WA × %d\n", WA_count);
  printf("TLE × %d\n", TLE_count);
  printf("RE × %d\n", RE_count);
  return 0;
}
