#include <bits/stdc++.h>
int main() {
  char str[256];
  int i, nums;
  int AC = 0;
  int WA = 0;
  int TLE = 0;
  int RE = 0;
  scanf("%d", &nums);
  for (i = 0; i < nums; i++) {
    scanf("%s", &str);
    fflush(stdin);
    if (strcmp(str, "AC\n") == 0) {
      AC++;
    } else if (strcmp(str, "WA\n") == 0) {
      WA++;
    } else if (strcmp(str, "TLE\n") == 0) {
      TLE++;
    } else if (strcmp(str, "RE\n") == 0) {
      RE++;
    } else if (strcmp(str, "AC") == 0) {
      AC++;
    } else if (strcmp(str, "WA") == 0) {
      WA++;
    } else if (strcmp(str, "TLE") == 0) {
      TLE++;
    } else if (strcmp(str, "RE") == 0) {
      RE++;
    }
  }
  printf("AC × %d\n", AC);
  printf("WA × %d\n", WA);
  printf("TLE × %d\n", TLE);
  printf("RE × %d\n", RE);
  return 0;
}
