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