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