#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<string> s(n);
  for (int i = 0; i < n; i++) {
    cin >> s.at(i);
  }
  int x1 = 0, x2 = 0, x3 = 0, x4 = 0;
  for (int i = 0; i < n; i++) {
    if (s.at(i) == "AC") {
      x1++;
    } else if (s.at(i) == "WA") {
      x2++;
    } else if (s.at(i) == "TLE") {
      x3++;
    } else {
      x4++;
    }
  }
  cout << "AC × " << x1 << endl;
  cout << "WA × " << x2 << endl;
  cout << "TLE × " << x3 << endl;
  cout << "RE × " << x4 << endl;
}
