#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string a[10000];
  cin >> n;
  int b = 0;
  int c = 0;
  int d = 0;
  int e = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    if (a[i] == "AC") {
      b++;
    } else if (a[i] == "WA") {
      c++;
    } else if (a[i] == "TLE") {
      d++;
    } else if (a[i] == "RE") {
      e++;
    }
  }
  cout << "AC × " << b << endl;
  cout << "WA × " << c << endl;
  cout << "TLE × " << d << endl;
  cout << "RE × " << e << endl;
}
