#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
const int M = 5e5 + 5;
const int OO = 1e9;
const int mod = 1e9 + 7;
int n, cnt[4];
string second, x[] = {"AC", "WA", "TLE", "RE"};
void init() {}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> second;
    for (int j = 0; j < 4; ++j) {
      if (second == x[j]) ++cnt[j];
    }
  }
  for (int j = 0; j < 4; ++j) {
    cout << x[j] << " X " << cnt[j] << '\n';
  }
  return 0;
}
