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