#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  cout << "AC × " << s.find("AC") << endl;
  cout << "WA × " << s.find("WA") << endl;
  cout << "TLE × " << s.find("TLE") << endl;
  cout << "RE × " << s.find("RE") << endl;
}
