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