#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<string> s(n);
  map<string, int> m;
  for (int i = (0); i < (n); ++i) {
    cin >> s[i];
    m[s[i]]++;
  }
  cout << "AC × " << m["AC"] << endl;
  cout << "WA × " << m["WA"] << endl;
  cout << "TLE × " << m["TLE"] << endl;
  cout << "RE × " << m["RE"] << endl;
}
