#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int N;
  string S;
  map<string, long long int> a;
  cin >> N;
  for (long long int i = 0; i < N; i++) {
    cin >> S;
    a[S] += 1;
  }
  cout << "AC ✕ " << a["AC"] << endl;
  cout << "WA ✕ " << a["WA"] << endl;
  cout << "TLE ✕ " << a["TLE"] << endl;
  cout << "RE ✕ " << a["RE"] << endl;
  return 0;
}
