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