#include <bits/stdc++.h>
const double pi = 3.141592653589793238462643383279;
using namespace std;
const double EPS = 1E-10;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  int N;
  cin >> N;
  map<string, int> mp;
  for (int i = 0; i < (int)N; ++i) {
    string s;
    cin >> s;
    mp[s]++;
  }
  cout << "AC × " << mp["AC"] << endl;
  cout << "WA × " << mp["WA"] << endl;
  cout << "TLE × " << mp["TLE"] << endl;
  cout << "RE × " << mp["RE"] << endl;
  return 0;
}
