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