#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  cin >> n;
  vector<char> v;
  map<char, int> m;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    v.push_back(s[0]);
  }
  for (int i = 0; i < n; i++) {
    m[v[i]]++;
  }
  cout << "AC × " << m['A'] << endl;
  cout << "WA × " << m['W'] << endl;
  cout << "TLE × " << m['T'] << endl;
  cout << "RE × " << m['R'] << endl;
}
