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