#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char s[n], c;
  cin >> s;
  vector<int> v;
  int w[n], b[n];
  if (s[0] == 'B')
    c = 'W';
  else
    c = 'B';
  for (int i = 0; i < n - 1; i++) {
    if (s[i] != c) {
      s[i] = c;
      if (s[i + 1] == 'B')
        s[i + 1] = 'W';
      else
        s[i + 1] = 'B';
      v.push_back(i + 1);
    }
  }
  if (s[n - 1] == c) {
    cout << v.size() << endl;
    for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
    cout << endl;
  } else {
    if (n % 2 == 1) {
      for (int i = 1; i < n - 1; i += 2) v.push_back(i);
      cout << v.size() << endl;
      for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
      cout << endl;
    } else {
      cout << "-1";
      cout << endl;
    }
  }
  return 0;
}
