#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a = 0;
  int w = 0;
  int t = 0;
  int r = 0;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    if (s[0] == 'A') {
      a++;
    } else if (s[0] == 'W') {
      w++;
    } else if (s[0] == 'T') {
      t++;
    } else {
      r++;
    }
  }
  cout << "AC x " << a << endl;
  cout << "WA x " << a << endl;
  cout << "TLE x " << a << endl;
  cout << "RE x " << a << endl;
  return 0;
}
