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