#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<string> C(N);
  for (int i = 0; i < N; i++) {
    cin >> C.at(i);
  }
  int ac = 0;
  int wa = 0;
  int tle = 0;
  int re = 0;
  for (int i = 0; i < N; i++) {
    if (C.at(i) == "AC") {
      ac++;
    } else if (C.at(i) == "WA") {
      wa++;
    } else if (C.at(i) == "TLE") {
      tle++;
    } else {
      re++;
    }
  }
  cout << "AC  ×  " << ac << endl;
  cout << "WA  ×  " << wa << endl;
  cout << "TLE  ×  " << tle << endl;
  cout << "RE  ×  " << re << endl;
}
