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