#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int AC = 0;
  int WA = 0;
  int TLE = 0;
  int RE = 0;
  vector<string> data(N);
  for (int i = 0; i < N; i++) {
    string tmp;
    cin >> tmp;
    data[i] = tmp;
  }
  sort(data.begin(), data.end());
  int j = 0;
  while (true) {
    if (j == N) break;
    string tmp = data[j];
    if (tmp == "AC") {
      AC++;
      j++;
    } else
      break;
  }
  while (true) {
    if (j == N) break;
    string tmp = data[j];
    if (tmp == "RE") {
      RE++;
      j++;
    } else
      break;
  }
  while (true) {
    if (j == N) break;
    string tmp = data[j];
    if (tmp == "TLE") {
      TLE++;
      j++;
    } else
      break;
  }
  while (true) {
    if (j == N) break;
    string tmp = data[j];
    if (tmp == "WA") {
      WA++;
      j++;
    } else
      break;
  }
  cout << "AC"
       << " "
       << "×"
       << " " << AC << endl;
  cout << "WA"
       << " "
       << "×"
       << " " << WA << endl;
  cout << "TLE"
       << " "
       << "×"
       << " " << TLE << endl;
  cout << "RE"
       << " "
       << "×"
       << " " << RE << endl;
}
