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