#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  int C0 = 0, C1 = 0, C2 = 0, C3 = 0;
  vector<string> S(N);
  for (int i = 0; i < N; i++) {
    if (S.at(i) == "AC") ++C0;
    if (S.at(i) == "WA") ++C1;
    if (S.at(i) == "TLE") ++C2;
    if (S.at(i) == "RE") ++C3;
  }
  cout << "AC x " << C0 << "WA x " << C1 << "TLE x " << C2 << "RE x " << C3
       << endl;
}
