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