#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
struct hash_pair {
  template <class T1, class T2>
  size_t operator()(const pair<T1, T2>& p) const {
    auto hash1 = hash<T1>{}(p.first);
    auto hash2 = hash<T2>{}(p.second);
    return hash1 ^ hash2;
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int testcases = 1;
  while (testcases--) {
    int n;
    cin >> n;
    int ac = 0, tle = 0, re = 0, wa = 0;
    for (int i = 0; i < n; i++) {
      string s;
      cin >> s;
      if (s[0] == 'R') re++;
      if (s[0] == 'T') tle++;
      if (s[0] == 'A') ac++;
      if (s[0] == 'W') wa++;
      cout << "AC X " << ac << endl;
      cout << "WA X " << wa << endl;
      cout << "TLE X " << tle << endl;
      cout << "RE X " << re << endl;
    }
  }
  return 0;
}
