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