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