#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int ac = 0, wa = 0, re = 0, tle = 0;
  vector<string> ju(n);
  for (int i = 0; i < (int)(n); i++) {
    cin >> ju[i];
    if (ju[i] == "AC") ac++;
    if (ju[i] == "WA") wa++;
    if (ju[i] == "TLE") tle++;
    if (ju[i] == "RE") re++;
  }
  cout << "AC × " << ac << endl
       << "WA × " << wa << endl
       << "TLE × " << tle << endl
       << "RE × " << re << endl;
  return 0;
}
