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