#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  string S;
  cin >> N;
  int AC = 0;
  int WA = 0;
  int TLE = 0;
  int RE = 0;
  for (int i = 0; i < N; ++i) {
    cin >> S;
    if (S == "AC") {
      AC = AC + 1;
    }
    if (S == "WA") {
      WA = WA + 1;
    }
    if (S == "TLE") {
      TLE = TLE + 1;
    }
    if (S == "RE") {
      RE = RE + 1;
    }
  }
  cout << "AC × " << AC << endl;
  cout << "WA × " << WA << endl;
  cout << "TLE × " << TLE << endl;
  cout << "RE × " << RE << endl;
}
