#include <iostream> 
#include <stdio.h>
#include <string>
using namespace std;

int main() {
  int N;
  string S(N);

  cin >> N;

  for (int i = 0; i < N; i++) {
    cin >> S.at(i);
  }

  int AC = 0;
  int WA = 0;
  int TLE = 0;
  int RE = 0;
  for (int i = 0; i < N; i++) {
    if (S.at(i) = "AC") {
      AC = AC + 1;
    }
    else if (S.at(i) = "WA") {
      WA = WA + 1;
    }
    else if (S.at(i) = "TLE") {
      TLE = TLE + 1;
    }
    else {
      RE = RE + 1;
    }
  }

  cout << "AC × " << AC << endl;
  cout << "WA × " << WA << endl;
  cout << "TLE × " << TLE << endl;
  cout << "RE × " << RE << endl;
}