#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
  int n, ac = 0, wa = 0, tle = 0, re = 0;
  cin >> n;
  vector<string> vt(n);
  for (int i = 0; i < (n); ++i) {
    cin >> vt.at(i);
    if (vt.at(i) == "AC")
      ac++;
    else if (vt.at(i) == "WA")
      wa++;
    else if (vt.at(i) == "TLE")
      tle++;
    else if (vt.at(i) == "RE")
      re++;
  }
  cout << "AC × " << ac << "\n";
  cout << "WA × " << wa << "\n";
  cout << "TLE × " << tle << "\n";
  cout << "RE  × " << re << endl;
  return 0;
}
