#include <bits/stdc++.h>
using namespace std;
using lli = long long int;
using ulli = unsigned long long int;
using ld = long double;
string st[4] = {"AC", "WA", "TLE", "RE"};
int main() {
  int n;
  cin >> n;
  string s;
  int c[4] = {};
  for (int i = 0; i < n; ++i) {
    cin >> s;
    for (int j = 0; j < 4; ++j) {
      if (s == st[j]) {
        c[j]++;
        break;
      }
    }
  }
  for (int i = 0; i < 4; ++i) {
    cout << st[i] << " X " << c[i] << "\n";
  }
  return 0;
}
