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