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