#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int c0 = 0;
  int c1 = 0;
  int c2 = 0;
  int c3 = 0;
  for (int i = 0; i < N; i++) {
    string S;
    cin >> S;
    if (S == "AC") {
      c0++;
    }
    if (S == "WA") {
      c1++;
    }
    if (S == "TLE") {
      c2++;
    }
    if (S == "RE") {
      c3++;
    }
  }
  cout << "AC × " << c0 << endl;
  cout << "WA × " << c1 << endl;
  cout << "TLE × " << c2 << endl;
  cout << "RE × " << c3 << endl;
}
