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