#include <bits/stdc++.h>
using namespace std;
const double pi = 3.141592653589793;
const long long inf = 1e18 + 5;
const int MOD = 1e9 + 7;
const int maxn = 1e5 + 5;
int cnt[4];
int main() {
  ios_base::sync_with_stdio(cin.tie(0) && 0);
  ;
  int n;
  cin >> n;
  string s[] = {"AC", "WA", "TLE", "RE"};
  for (int i = 0; i < n; i++) {
    string temp;
    cin >> temp;
    for (int j = 0; j < 4; j++) {
      if (temp == s[j]) cnt[j]++;
    }
  }
  for (int i = 0; i < 4; i++) {
    cout << s[i] << " X " << cnt[i] << '\n';
  }
  return 0;
}
