#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  int ans[5] = {};
  cin >> n;
  for (int i = 0; i < n; i++) {
    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;
}
