#include <bits/stdc++.h>
int main() {
  int n;
  int ac = 0, wa = 0, tle = 0, re = 0;
  scanf("%d", &n);
  char* s = (char*)malloc(sizeof(char) * n);
  for (int i = 0; i < n; i++) {
    scanf("%s", s + i);
  }
  for (int i = 0; i < n; i++) {
    if (*(s + i) == 'A') {
      ac++;
    } else if (*(s + i) == 'W') {
      wa++;
    } else if (*(s + i) == 'T') {
      tle++;
    } else if (*(s + i) == 'R') {
      re++;
    }
  }
  printf("AC × %d\nWA × %d\nTLE × %d\nRE × %d\n", ac, wa, tle, re);
  return 0;
}
