#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int i, N, first = 0, sec = 0, third = 0, fourth = 0;
  cin >> N;
  for (i = 0; i < N * 2; i++) {
    cin >> s[i];
    switch (s[i]) {
      case 'C': {
        first++;
        break;
      }
      case 'T': {
        sec++;
        break;
      }
      case 'W': {
        third++;
        break;
      }
      case 'R': {
        fourth++;
        break;
      }
    }
  }
  cout << "AC x " << first << endl;
  cout << "WA x " << third << endl;
  cout << "TLE x " << sec << endl;
  cout << "RE x " << fourth;
  return 0;
}
