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