#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];
    if (s[i] == 'C')
      first++;
    else if ((s[i] == 'T'))
      sec++;
    else if (s[i] == 'W')
      third++;
    else if (s[i] == 'R')
      fourth++;
  }
  cout << "AC x " << first << endl;
  cout << "WA x " << third << endl;
  cout << "TLE x " << sec << endl;
  cout << "RE x " << fourth;
  return 0;
}
