#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string block;
  cin >> block;
  int b = 0, w = 0;
  for (int i = 0; i < n; i++) {
    b += block[i] == 'B';
    w += block[i] == 'W';
  }
  if (b % 2 && w % 2) {
    cout << -1;
  } else {
    char change = 'B', to = 'W';
    if (b % 2) {
      change = 'W';
      to = 'B';
    }
    vector<int> op;
    for (int i = 0; i + 1 < n; i++) {
      if (block[i] == change) {
        op.push_back(i + 1);
        if (block[i + 1] == change)
          block[i + 1] = to;
        else
          swap(block[i], block[i + 1]);
      }
    }
    int sz = op.size();
    cout << sz << "\n";
    for (int i = 0; i < sz; i++) cout << op[i] << " ";
  }
}
