#include <bits/stdc++.h>
const int mx = 1e6 + 5;
using namespace std;
long long b[200051], a[200010], aa[200010], t, k, ev = 0, od = 0, tt = 0, n,
                                                  cas = 1;
vector<int> vec[mx];
vector<pair<long long, long long> > v;
int vis[mx] = {}, edge;
long long cost[mx], l = 0, c2[mx];
bool ok = true;
int chid[mx];
long long dp[mx], f[mx];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  map<string, int> mp;
  scanf("%lld", &t);
  long long tm = t;
  for (int i = 0; i < t; i++) {
    string x;
    cin >> x;
    mp[x]++;
  }
  vector<string> vec;
  vec.push_back("AC");
  vec.push_back("WA");
  vec.push_back("TLE");
  vec.push_back("RE");
  for (int i = 0; i < 4; i++) {
    cout << vec[i] << " x " << mp[vec[i]] << endl;
  }
  return 0;
}
