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