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