#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vii = vector<vi>;
using ll = long long;
int main() {
  int n;
  cin >> n;
  vector<string> s(n);
  int ac, wa, tle, re;
  ac = 0;
  wa = 0;
  tle = 0;
  re = 0;
  for (int i = 0; i < (int)(n); i++) {
    cin >> s.at(i);
  }
  for (int i = 0; i < (int)(n); i++) {
    if ("AC" == s.at(i)) ac++;
    if ("WA" == s.at(i)) wa++;
    if ("TLE" == s.at(i)) tle++;
    ;
    if ("RE" == s.at(i)) re++;
  }
  cout << "AC × " << ac << endl;
  cout << "WA × " << wa << endl;
  cout << "TLE × " << tle << endl;
  cout << "RE × " << re << endl;
  return 0;
}
