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