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