#include <bits/stdc++.h>
using namespace std;
using Int = long long;
using vi = vector<Int>;
using vvi = vector<vi>;
using pii = pair<Int, Int>;
const Int dy[] = {-1, 0, 1, 0};
const Int dx[] = {0, 1, 0, -1};
template <typename T>
void reverse(vector<T> &v) {
  reverse(v.begin(), v.end());
}
template <typename T>
void sort(vector<T> &v) {
  sort(v.begin(), v.end());
}
template <typename T>
void rsort(vector<T> &v) {
  sort(v.rbegin(), v.rend());
}
template <typename T>
T sum(const vector<T> &v) {
  return accumulate(v.begin(), v.end(), T(0));
}
template <class T>
void update_max(T &a, const T &b) {
  a = max(a, b);
}
template <class T>
void update_min(T &a, const T &b) {
  a = min(a, b);
}
vector<pair<char, Int>> merge_cont_char(const string &s) {
  vector<pair<char, Int>> ret;
  if (s.empty()) return ret;
  ret.push_back(make_pair(s[0], 0));
  for (auto &&c : s) {
    if (ret.back().first == c)
      ret.back().second++;
    else
      ret.push_back(make_pair(c, 1));
  }
  return ret;
}
class Shakutori {
 public:
  Int head, tail, end = 0;
  bool moveHead() {
    if (head == end) {
      return false;
    }
    head++;
    return true;
  }
  void moveTail() { tail++; }
  bool valid() {
    if (head == tail) return true;
    return true;
  }
  void solve() {
    head = tail = 0;
    Int ans = 0;
    while (moveHead()) {
      while (!valid()) {
        moveTail();
      }
    }
  }
};
class Solver {
 public:
  Int ans = 0;
  map<string, int> M;
  Solver() {}
  void input() {
    int N;
    cin >> N;
    for (Int i = 0; i < Int(N); i++) {
      string s;
      cin >> s;
      M[s]++;
    }
  }
  void solve() {}
  void output() {
    vector<string> V;
    V.push_back("AC");
    V.push_back("WA");
    V.push_back("TLE");
    V.push_back("RE");
    for (auto &&v : V) {
      cout << v << " x " << M[v] << endl;
    }
  }
};
void initilization() {
  struct BoolName : numpunct<char> {
    string t, f;
    BoolName(string t = "Yes", string f = "No") : t(t), f(f) {}
    string do_truename() const { return t; }
    string do_falsename() const { return f; }
  };
  cin.tie(nullptr);
  ios::sync_with_stdio(0);
  cout << fixed << setprecision(15) << boolalpha;
  cout.imbue(locale(cout.getloc(), new BoolName));
}
int main() {
  initilization();
  Solver s;
  s.input();
  s.solve();
  s.output();
  return 0;
}
