#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<string> jR(N);
  for (int i = 0; i < N; i++) {
    cin >> jR[i];
  }
  int acNum = 0;
  int waNum = 0;
  int tleNum = 0;
  int reNum = 0;
  for (int i = 0; i < N; i++) {
    if (jR[i] == "AC") {
      acNum++;
    } else if (jR[i] == "WA") {
      waNum++;
    } else if (jR[i] == "TLE") {
      tleNum++;
    } else if (jR[i] == "RE") {
      reNum++;
    }
  }
  cout << "AC　×　" << acNum << endl;
  cout << "WA　×　" << waNum << endl;
  cout << "TLE　×　" << tleNum << endl;
  cout << "RE　×　" << reNum << endl;
}
