#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long N;
  cin >> N;
  vector<string> S(N);
  for (long long i = 0; i < N; i++) {
    cin >> S[i];
  }
  vector<long long> C(4);
  for (long long i = 0; i < 4; i++) {
    C[i] = 0;
  }
  for (long long i = 0; i < N; i++) {
    if (S[i] == "AC") {
      C[0]++;
    } else if (S[i] == "WA") {
      C[1]++;
    } else if (S[i] == "TLE") {
      C[2]++;
    } else {
      C[3]++;
    }
  }
  cout << "AC　×　" << C[0] << endl;
  cout << "WA　×　" << C[1] << endl;
  cout << "TLE　×　" << C[2] << endl;
  cout << "RE　×　" << C[3] << endl;
}
