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