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