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