#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);
  }
  int sw1 = 0;
  int sw2 = 0;
  int sw3 = 0;
  int sw4 = 0;
  for (int i = 0; i < N; i++) {
    if (S.at(i) == "AC") {
      sw1++;
    } else if (S.at(i) == "WA") {
      sw2++;
    } else if (S.at(i) == "TLE") {
      sw3++;
    } else {
      sw4++;
    }
  }
  cout << "AC × " + to_string(sw1) << endl;
  cout << "WA × " + to_string(sw2) << endl;
  cout << "TLE × " + to_string(sw3) << endl;
  cout << "RE × " + to_string(sw4) << endl;
}
