#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;
  string R;
  for (int i = 0; i < N; i++) {
    cin >> R;
    if (R == "AC") {
      C0++;
    } else if (R == "WA") {
      C1++;
    } else if (R == "TLE") {
      C2++;
    } else if (R == "RE") {
      C3++;
    }
  }
  cout << "AC × " << C0 << endl;
  cout << "WA × " << C1 << endl;
  cout << "TLE × " << C2 << endl;
  cout << "RE × " << C3 << endl;
}
