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