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