#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long INF = 1e18;
const double pi = acos(-1.0);
int main(void) {
  long long n;
  cin >> n;
  map<string, long long> mp;
  for (int i = 0; i < (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;
}
