#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  char ar[n];
  for (int i = 0; i < n; ++i) {
    cin >> ar[i];
  }
  int co = 0;
  vector<int> po;
  for (int i = 0; i < n - 1; ++i) {
    if (ar[i] == 'W') {
      ar[i] = 'B';
      co++;
      po.push_back(i + 1);
      if (ar[i + 1] == 'B') {
        ar[i + 1] = 'W';
      } else {
        ar[i + 1] = 'B';
      }
    }
  }
  if (ar[n - 1] == 'B') {
    cout << co << endl;
    for (int i = 0; i < po.size(); ++i) {
      cout << po[i] << " ";
    }
    cout << endl;
  } else {
    if (n % 2 == 0) {
      cout << -1 << endl;
    } else {
      cout << co + (n - 1) / 2 << endl;
      for (int i = 0; i < po.size(); ++i) {
        cout << po[i] << " ";
      }
      for (int i = 0; i < (n - 1) / 2; ++i) {
        cout << 2 * i + 1 << " ";
      }
      cout << endl;
    }
  }
  return 0;
}
