#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<string> S(n);
  string test[4] = {"AC", "WA", "TLE", "RE"};
  vector<int> count(4);
  for (string &e : S) cin >> e;
  for (int j = 0; j < n; j++) {
    for (int i = 0; i < 4; i++) {
      if (test[i] == S[j]) {
        count[i]++;
      }
    }
  }
  for (int i = 0; i < 4; i++) {
    cout << test[i] << " ×　" << count[i] << endl;
  }
  return 0;
}
