#include <bits/stdc++.h>
using namespace std;
using UL = unsigned int;
using ULL = unsigned long long;
using LL = long long;
int main() {
  UL N;
  cin >> N;
  UL ans[4] = {};
  string vd[4] = {"AC", "WA", "TLE", "RE"};
  for (UL i = 0; i < (N); i++) {
    string S;
    cin >> S;
    for (UL j = 0; j < (4); j++)
      if (S == vd[j]) ans[j]++;
  }
  for (UL i = 0; i < (4); i++) {
    cout << vd << " x " << ans[i] << endl;
  }
  return 0;
}
