#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1000;
int n;
int path[N];
vector<int> v;
char s[N];
int tot;
int main() {
  cin >> n;
  cin >> (s + 1);
  for (int i = 1; i < n; i++) {
    if (s[i] == 'B') {
      s[i] = 'W';
      if (s[i + 1] == 'W')
        s[i + 1] = 'B';
      else
        s[i + 1] = 'W';
      v.push_back(i);
    }
  }
  if (s[n] == 'W') {
    cout << v.size() << endl;
    for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
    cout << endl;
    return 0;
  }
  for (int i = 1; i < n; i++) {
    if (s[i] == 'W') {
      s[i] = 'B';
      if (s[i + 1] == 'W')
        s[i + 1] = 'B';
      else
        s[i + 1] = 'W';
      v.push_back(i);
    }
  }
  if (s[n] == 'B') {
    cout << v.size() << endl;
    for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
    cout << endl;
    return 0;
  }
  cout << -1 << endl;
  return 0;
}
