#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<string> S(N);
  for (int i = 0; i < (int)(N); i++) {
    cin >> S[i];
  }
  int C0, C1, C2, C3 = 0;
  for (int i = 0; i < (int)(N); i++) {
    if (S[i] == "AC") {
      ++C0;
    } else if (S[i] == "WA") {
      ++C1;
    } else if (S[i] == "TLE") {
      ++C2;
    } else {
      ++C3;
    }
  }
  cout << "AC × " << C0 << endl;
  cout << "WA × " << C1 << endl;
  cout << "TLE × " << C2 << endl;
  cout << "RE × " << C3 << endl;
}
