#include <bits/stdc++.h>
using namespace std;
int main() {
  int a;
  cin >> a;
  vector<string> vec(a);
  vector<int> ans(4);
  for (int i = 0; i < a; i++) {
    cin >> vec.at(i);
  }
  for (int i = 0; i < a; i++) {
    if (vec.at(i) == "AC") {
      ans.at(0)++;
    } else if (vec.at(i) == "WA") {
      ans.at(1)++;
    } else if (vec.at(i) == "TLE") {
      ans.at(2)++;
    } else if (vec.at(i) == "RE") {
      ans.at(3)++;
    }
  }
  cout << "AC × " + ans.at(0) << endl;
  cout << "WA × " + ans.at(1) << endl;
  cout << "TLE × " + ans.at(2) << endl;
  cout << "RE × " + ans.at(3) << endl;
}
