#include <bits/stdc++.h>
int main(int argc, char *argv[]) {
  int s = 0;
  int a = 0;
  int w = 0;
  int t = 0;
  int r = 0;
  int i;
  char *s1 = "AC";
  char *s2 = "WA";
  char *s3 = "TLE";
  char *s4 = "RE";
  for (i = 0; i < argc; i++) argv[i] = argv[i + 1];
  for (i = 1; i < argc - 1; i++)
    if (strcmp(argv[i], s1) == 0) {
      a++;
    } else if (strcmp(argv[i], s2) == 0) {
      w++;
    } else if (strcmp(argv[i], s3) == 0) {
      t++;
    } else if (strcmp(argv[i], s4) == 0) {
      r++;
    }
  printf("AC × %d\n", a);
  printf("WA × %d\n", w);
  printf("TLE × %d\n", t);
  printf("RE × %d\n", r);
  return 0;
}
