#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int s0 = 0, s1 = 0, s2 = 0, s3 = 0;
  char word;
  cin >> word;
  if (word == 'AC') {
    s0 += 1;
  } else if (word == 'WA') {
    s1 += 1;
  } else if (word == 'TLE') {
    s2 += 1;
  } else {
    s3 += 1;
  }
  cout << "AC x " << s0 << endl;
  cout << "WA x " << s1 << endl;
  cout << "TLE x " << s2 << endl;
  cout << "RE x " << s3 << endl;
}
