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

int main() {
  int N;

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

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

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