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