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