#include<bits/stdc++.h>
using namespace std;
int main () {
  int N;
  cin >> N;
  string jud[] = {"AC", "WA", "TLE", "RE"};
  int n_jud[] = {0, 0, 0, 0};
  for (int i = 0; i < N; i ++) {
    strig S;
    cin >> S;
    for (int j = 0; j < 4; j ++) {
      if (jud[j] == S) {
        n_jud[j] ++;
      }
    }
  }
  for (int i = 0; i < 4; i ++) {
    cout << jud[i] << " x " << n_jud[i] << endl;
  }
}