#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int n, ac = 0, wa = 0, tle = 0, re = 0;
  cin >> n;
  vector<string> s(n);
  for (int i = 0; i < (n); i++) {
    cin >> s[i];
    if (s[i] == "AC") {
      ac++;
    } else if (s[i] == "WA") {
      wa++;
    } else if (s[i] == "TLE") {
      tle++;
    } else {
      re++;
    }
  }
  cout << "AC × " + ac << endl;
  cout << "WA × " + wa << endl;
  cout << "TLE × " + tle << endl;
  cout << "RE × " + re << endl;
  return 0;
}
