#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  int N;
  cin >> N;
  int ac = 0;
  int wa = 0;
  int tle = 0;
  int re = 0;
  for (int i = 0; i < N; i++) {
    string buf;
    cin >> buf;
    if (buf.compare("AC") == 0) {
      ac++;
    } else if (buf.compare("WA") == 0) {
      wa++;
    } else if (buf.compare("TLE") == 0) {
      tle++;
    } else if (buf.compare("RE") == 0) {
      re++;
    }
  }
  cout << "AC × " << ac << endl;
  cout << "WA × " << wa << endl;
  cout << "TLE × " << tle << endl;
  cout << "RE × " << re << endl;
}
