#include <bits/stdc++.h>
int main() {
  char s[100];
  int n, i, a = 0, b = 0, c = 0, d = 0;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%s", &s);
    if (strcmp(s, "AC") == 0)
      a++;
    else if (strcmp(s, "WA") == 0)
      b++;
    else if (strcmp(s, "TLE") == 0)
      c++;
    else
      d++;
  }
  printf("AC × %d\nWA × %d\nTLE × %d\nRE × %d\n", a, b, c, d);
  return 0;
}
