#include <bits/stdc++.h>
using namespace std;
void Main() {
  int N;
  cin >> N;
  int AC_cnt = 0;
  int WA_cnt = 0;
  int TLE_cnt = 0;
  int RE_cnt = 0;
  for (int i = 0; i < N; i++) {
    string S;
    cin >> S;
    if (S == "AC") {
      AC_cnt++;
    } else if (S == "WA") {
      WA_cnt++;
    } else if (S == "TLE") {
      TLE_cnt++;
    } else {
      RE_cnt++;
    }
  }
  cout << "AC × " << AC_cnt << endl;
  cout << "WA × " << WA_cnt << endl;
  cout << "TLE × " << TLE_cnt << endl;
  cout << "RE × " << RE_cnt << endl;
}
int main() {
  std::cout << std::fixed << std::setprecision(15);
  Main();
  return 0;
}
