#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int resultbool = 1;
  string x = s;
  vector<int> v1, v2;
  for (int i = 0; i < n - 1; i++) {
    if (s[i] == 'B') {
      s[i] = 'W';
      v1.push_back(i + 1);
      if (s[i + 1] == 'W')
        s[i + 1] = 'B';
      else
        s[i + 1] = 'W';
    }
  }
  for (int i = 0; i < n; i++) {
    if (s[i] != 'W') {
      resultbool = 3;
    }
  }
  if (resultbool == 1) {
    cout << v1.size() << endl;
    for (int i = 0; i < v1.size(); i++) cout << v1[i] << " ";
    cout << endl;
    return 0;
  }
  resultbool = 2;
  s = x;
  for (int i = 0; i < n - 1; i++) {
    if (s[i] == 'W') {
      s[i] = 'B';
      v2.push_back(i + 1);
      if (s[i + 1] == 'W')
        s[i + 1] = 'B';
      else
        s[i + 1] = 'W';
    }
  }
  for (int i = 0; i < n; i++) {
    if (s[i] != 'B') {
      resultbool = 3;
    }
  }
  if (resultbool == 2) {
    cout << v2.size() << endl;
    for (int i = 0; i < v2.size(); i++) cout << v2[i] << " ";
    cout << endl;
    return 0;
  }
  if (resultbool == 3) cout << -1 << endl;
}
