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