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