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