#include <bits/stdc++.h>
using namespace std;
using ll = long long;
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  map<string, int> mp;
  for (int i = 0; i < n; ++i) {
    string s;
    cin >> s;
    ++mp[s];
  }
  cout << "AC × " << mp["AC"] << '\n';
  cout << "WA × " << mp["WA"] << '\n';
  cout << "TLE × " << mp["TLE"] << '\n';
  cout << "RE × " << mp["RE"] << '\n';
  return (0);
}
