#include <iostream> 
#include <vector>
using namespace std;

int main() {
  int N;

  cin >> N;
  vector<string> vec(N);
  for (int i = 0; i < N; i++) {
    cin >> vec.at(i);
  }

  int AC = 0;
  int WA = 0;
  int TLE = 0;
  int RE = 0;
  for (int i = 0; i < N; i++) {
    if (vec.at(i) = "AC") {
      AC = AC + 1;
    }
    else if (vec.at(i) = "WA") {
      WA = WA + 1;
    }
    else if (vec.at(i) = "TLE") {
      TLE = TLE + 1;
    }
    else {
      RE = RE + 1;
    }
  }

  cout << "AC　×　"　<< AC << endl;
  cout << "WA　×　"　<< WA << endl;
  cout << "TLE　×　"　<< TLE << endl;
  cout << "RE　×　"　<< RE << endl;
}