#include <bits/stdc++.h>
using namespace std;
int main() {
  string st[100010];
  int N;
  int a, w, t, r;
  a = 0, w = 0, t = 0, r = 0;
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> st[i];
  }
  for (int i = 0; i < N; i++) {
    if (st[i] == "AC")
      a++;
    else if (st[i] == "WA")
      w++;
    else if (st[i] == "TLE")
      t++;
    else if (st[i] == "RE")
      r++;
  }
  printf("AC × %d", a);
  cout << endl;
  printf("WA × %d", w);
  cout << endl;
  printf("TLE × %d", t);
  cout << endl;
  printf("RE × %d", r);
  cout << endl;
}
