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