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