#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<string> v(n);
  for (int i = 0; i < (int)(n); i++) cin >> v[i];
  long long ac = 0, wa = 0, tle = 0, re = 0;
  for (int i = 0; i < (int)(n); i++) {
    if (v[i] == "AC") ac++;
    if (v[i] == "WA") wa++;
    if (v[i] == "TLE") tle++;
    if (v[i] == "RE") re++;
  }
  cout << "AC ×"
       << " " << ac << endl;
  cout << "WA ×"
       << " " << wa << endl;
  cout << "TLE ×"
       << " " << tle << endl;
  cout << "RE ×"
       << " " << re << endl;
}
