#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  string S;
  int ac, wa, tle, re;
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> S;
    if (S.compare("AC")) {
      ac++;
    } else if (S.compare("WA")) {
      wa++;
    } else if (S.compare("TLE")) {
      tle++;
    } else {
      re++;
    }
  }
  printf("AC × %d", ac);
  printf("WA × %d", wa);
  printf("TLE × %d", tle);
  printf("RE × %d", re);
  return 0;
}
