#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<string> S(N);
  for (int i = 0; i < N; i++) {
    cin >> S.at(i);
  }
  vector<int> C(N, 0);
  for (int i = 0; i < N; i++) {
    if (S.at(i) == "AC") {
      C.at(0)++;
    }
    if (S.at(i) == "WA") {
      C.at(1)++;
    }
    if (S.at(i) == "TLE") {
      C.at(2)++;
    }
    if (S.at(i) == "RE") {
      C.at(3)++;
    }
  }
  cout << "AC × " << C.at(0) << endl;
  cout << "WA × " << C.at(1) << endl;
  cout << "TLE × " << C.at(2) << endl;
  cout << "RE × " << C.at(3) << endl;
}
