#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[4] = {0, 0, 0, 0};
  int b;
  cin >> b;
  string c;
  for (int i = 0; i < b; i++) {
    cin >> c;
    switch (c[0]) {
      case 'A':
        a[0] += 1;
        break;
      case 'W':
        a[1] += 1;
        break;
      case 'T':
        a[2] += 1;
        break;
      case 'R':
        a[3] += 1;
        break;
    }
  }
  cout << "AC × " << a[0] << endl;
  cout << "WA × " << a[1] << endl;
  cout << "TLE × " << a[2] << endl;
  cout << "RE × " << a[3] << endl;
}
