#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  char c;
  int ac = 0, wa = 0, tle = 0, re = 0;
  for (int i = 0; i < n; i++) {
    scanf("%c", &c);
    switch (c) {
      case 'A':
        ac++;
        break;
      case 'W':
        wa++;
        break;
      case 'T':
        tle++;
        break;
      case 'R':
        re++;
        break;
    }
  }
  printf("AC x %d", ac);
  printf("WA x %d", wa);
  printf("TLE x %d", tle);
  printf("RE x %d", re);
  return 0;
}
