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