#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using ll = long long;
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int ca = 0;
  int cb = 0;
  int cc = 0;
  int cd = 0;
  int n;
  cin >> n;
  vector<string> vec(n);
  for (int i = 0; i < n; i++) {
    cin >> vec[i];
    if (vec[i] == "AC") {
      ca++;
    }
    if (vec[i] == "WA") {
      cb++;
    }
    if (vec[i] == "TLE") {
      cc++;
    }
    if (vec[i] == "RE") {
      cd++;
    }
  }
  cout << "AC × " << ca << "\n";
  cout << "WA × " << cb << "\n";
  cout << "TLE × " << cc << "\n";
  cout << "RE × " << cd;
  return 0;
}
