#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  string b[4];
  b[0] = "AC";
  b[1] = "WA";
  b[2] = "TLE";
  b[3] = "RE";
  long long c[4];
  fill(c, c + 4, 0);
  string a;
  for (long long i = 0; i < n; i++) {
    cin >> a;
    if (a == "AC") {
      c[0]++;
    }
    if (a == "WA") {
      c[1]++;
    }
    if (a == "TLE") {
      c[2]++;
    }
    if (a == "RE") {
      c[3]++;
    }
  }
  for (long long i = 0; i < 4; i++) {
    cout << b[i] << " "
         << "×"
         << " " << c[i] << endl;
  }
}
