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