#include <bits/stdc++.h>
int main() {
  int N;
  scanf("%d", &N);
  char judge[N][4];
  int i, ac = 0, wa = 0, tle = 0, re = 0;
  for (i = 0; i < N; i++) {
    scanf("%s", judge[i]);
    if (strcmp(judge[i], "AC")) {
      ac++;
    } else if (strcmp(judge[i], "WA")) {
      wa++;
    } else if (strcmp(judge[i], "TLE")) {
      tle++;
    } else if (strcmp(judge[i], "RE")) {
      re++;
    }
  }
  printf("AC × %d\n", ac);
  printf("WA × %d\n", wa);
  printf("TLE × %d\n", tle);
  printf("RE × %d", re);
  return 0;
}
