#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  string t;
  map<string, int> m;
  int n;
  cin >> n;
  while (n--) {
    cin >> t;
    m[t]++;
  }
  cout << "AC"
       << " × " << m["AC"] << endl;
  cout << "WA"
       << " × " << m["WA"] << endl;
  cout << "TLE"
       << " × " << m["TLE"] << endl;
  cout << "RE"
       << " × " << m["RE"] << endl;
  return 0;
}
