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