#include <bits/stdc++.h>
int max(int a, int b) {
  if (a > b)
    return a;
  else
    return b;
}
int min(int a, int b) {
  if (a < b)
    return a;
  else
    return b;
}
int sort(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int main() {
  int n;
  scanf("%d", &n);
  int ac = 0, wa = 0, tle = 0, re = 0;
  char tmp[100001][5];
  for (int i = 0; i < n; ++i) {
    scanf("%s", tmp + i);
    if (strcmp(tmp[i], "AC") == 0)
      ac++;
    else if (strcmp(tmp[i], "WA") == 0)
      wa++;
    else if (strcmp(tmp[i], "TLE") == 0)
      tle++;
    else if (strcmp(tmp[i], "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;
}
