#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
int main() {
  int n;
  cin >> n;
  map<string, int> count;
  count["AC"] = 0;
  count["WA"] = 0;
  count["TLE"] = 0;
  count["RE"] = 0;
  for (int i = 0; i < n; i++) {
    string str;
    cin >> str;
    count.at(str) += 1;
  }
  cout << "AC × " << count.at("AC") << endl;
  cout << "WA × " << count.at("WA") << endl;
  cout << "TLE × " << count.at("TLE") << endl;
  cout << "RE × " << count.at("RE") << endl;
  return 0;
}
