#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<string> vec(N);
  vector<int> count = {0, 0, 0, 0};
  vector<string> dic = {"AC", "WA", "TLE", "RE"};
  for (int i = 0; i < (int)(N); i++) {
    string s;
    cin >> s;
    for (int i = 0; i < (int)(4); i++) {
      if (dic.at(i) == s) {
        count.at(i) += 1;
      }
    }
  }
  for (int i = 0; i < (int)(4); i++) {
    cout << dic.at(i) << "×" << count.at(i) << endl;
  }
  return 0;
}
