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