#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int i, x, N, c0, c1, c2, c3;
  c0 = 0;
  c1 = 0;
  c2 = 0;
  c3 = 0;
  cin >> N;
  string S[N];
  for (x = 0; x < N; x++) {
    cin >> S[x];
  }
  for (i = 0; i < N; i++) {
    if (S[i] == "AC") {
      c0++;
    }
    if (S[i] == "WA") {
      c1++;
    }
    if (S[i] == "TLE") {
      c2++;
    }
    if (S[i] == "RE") {
      c3++;
    }
  }
  cout << "AC × " << c0 << endl
       << "WA × " << c1 << endl
       << "TLE × " << c2 << endl
       << "RE × " << c3;
  return 0;
}
