#include <bits/stdc++.h>
using namespace std;
using p = pair<int, int>;
using ll = long long;
int main() {
  int n;
  cin >> n;
  vector<int> ans(4);
  for (int i = 0; i < (n); ++i) {
    string s;
    cin >> s;
    if (s == "AC")
      ans.at(0)++;
    else if (s == "WA")
      ans.at(1)++;
    else if (s == "TLE")
      ans.at(2)++;
    else
      ans.at(3)++;
  }
  cout << "AC × " << ans.at(0) << endl;
  cout << "WA × " << ans.at(1) << endl;
  cout << "TLE × " << ans.at(2) << endl;
  cout << "RE × " << ans.at(3) << endl;
  return 0;
}
