#include <bits/stdc++.h>
using namespace std;
string words[4] = {"AC", "WA", "TLE", "RTE"};
int main() {
  int n;
  cin >> n;
  vector<int> v(4);
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    for (int id = 0; id < 4; id++) {
      if (words[id] != s) continue;
      v[id]++;
    }
  }
  for (int i = 0; i < 4; i++) {
    cout << words[i] << " x " << v[i] << '\n';
  }
  return 0;
}
