#include <bits/stdc++.h>
using namespace std;
class BBlocks {
 public:
  void solve(std::istream &in, std::ostream &out) {
    string s;
    in >> s >> s;
    string x = "BW";
    for (auto y : x) {
      vector<int> answer;
      int n = s.length();
      string t = s;
      for (int i = 0; i + 1 < n; ++i) {
        if (t[i] != y) {
          answer.push_back(i + 1);
          t[i + 1] = x[0] + x[1] - t[i + 1];
        }
      }
      if (t.back() == y) {
        out << answer.size() << endl;
        for (auto u : answer) {
          out << u << " ";
        }
        out << endl;
        return;
      }
    }
    out << -1 << endl;
  }
};
int main() {
  BBlocks solver;
  std::istream &in(std::cin);
  std::ostream &out(std::cout);
  solver.solve(in, out);
  return 0;
}
