#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> q;
  string s;
  cin >> s;
  for (int i = 0; i < n - 1; i++) {
    if (s[i] == 'W') {
      s[i] = 'B';
      s[i + 1] = s[i + 1] == 'W' ? 'B' : 'W';
      q.push_back(i);
    }
  }
  if (s[n - 1] == 'B') {
    cout << q.size() << endl;
    for (int i = 0; i < q.size(); i++) cout << q[i] + 1 << ' ';
    cout << endl;
    return 0;
  }
  for (int i = 0; i < n - 1; i++) {
    if (s[i] == 'B') {
      s[i] = 'W';
      s[i + 1] = s[i + 1] == 'W' ? 'B' : 'W';
      q.push_back(i);
    }
  }
  if (s[n - 1] == 'W') {
    cout << q.size() << endl;
    for (int i = 0; i < q.size(); i++) cout << q[i] + 1 << ' ';
    cout << endl;
    return 0;
  }
  cout << "-1" << endl;
}
