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