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