#include <bits/stdc++.h>
using namespace std;
int c = 0;
unordered_map<string, bool> memo;
bool sb(int i, string s, vector<int> moves, vector<int>& sol, int mreset) {
  string rem = s;
  if (memo.find(rem) != memo.end()) return memo.at(rem);
  if (s.find('W') == string::npos || s.find('B') == string::npos) {
    sol = moves;
    memo[rem] = true;
    return true;
  }
  if (i >= s.size() - 1) {
    if (mreset == 0) {
      memo[rem] = false;
      return false;
    }
    mreset = 0;
    i = 0;
  }
  if (moves.size() >= s.size() * 3) {
    moves.clear();
    memo[rem] = false;
    return false;
  }
  if (s[i] == s[i + 1]) {
    s[i] = (s[i] == 'B') ? 'W' : 'B';
    s[i + 1] = (s[i + 1] == 'B') ? 'W' : 'B';
    moves.push_back(i);
    mreset++;
    if (sb(i + 2, s, moves, sol, mreset)) {
      return true;
    }
  }
  if (sb(i + 1, s, moves, sol, mreset)) {
    return true;
  }
  if (true) {
    s[i] = (s[i] == 'B') ? 'W' : 'B';
    s[i + 1] = (s[i + 1] == 'B') ? 'W' : 'B';
    moves.push_back(i);
    mreset++;
    if (sb(i + 1, s, moves, sol, mreset)) {
      return true;
    }
  }
  memo[rem] = false;
  return false;
}
int main() {
  int n;
  string s;
  cin >> n >> s;
  vector<int> sol;
  for (int i = 0; i < n - 1; ++i) {
    if (s[i] == 'B' && s[i + 1] == 'W') {
      s[i] = 'W';
      s[i + 1] = 'B';
      sol.push_back(i);
    } else if (s[i] == 'B' && s[i + 1] == 'B') {
      s[i] = 'W';
      s[i + 1] = 'W';
      sol.push_back(i);
    }
  }
  const int nW = count(begin(s), end(s), 'W');
  const int nB = count(begin(s), end(s), 'B');
  if (nW % 2 != 0 && nB % 2 != 0) {
    cout << -1 << endl;
  } else {
    if (nW % 2 != 0) {
      for (int i = 0; i < s.size() - 1; ++i) {
        if (s[i] == 'B' && s[i + 1] == 'B') {
          s[i] = 'W';
          s[i + 1] = 'W';
          sol.push_back(i);
        }
      }
    } else {
      for (int i = 0; i < s.size() - 1; ++i) {
        if (s[i] == 'W' && s[i + 1] == 'W') {
          s[i] = 'B';
          s[i + 1] = 'B';
          sol.push_back(i);
        }
      }
    }
    cout << sol.size() << endl;
    for (int i = 0; i < sol.size(); ++i) {
      cout << sol[i] + 1;
      if (i == sol.size() - 1)
        cout << endl;
      else
        cout << " ";
    }
  }
  return 0;
}
