#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  string c;
  cin >> c;
  int cntb = 0, cntw = 0;
  for (int i = 0; i < n; i++) {
    if (c[i] == 'B')
      cntb++;
    else
      cntw++;
  }
  if (cntb % 2 == 1 && cntw % 2 == 1) {
    cout << -1;
    return 0;
  }
  vector<int> p;
  char swp = 'W', neg = 'B';
  if (cntw % 2) swp = 'B', neg = 'W';
  for (int i = 1; i < n; i++) {
    if (c[i] == c[i - 1] && c[i] == swp) {
      c[i] = c[i - 1] = neg;
      p.push_back(i);
    }
  }
  for (int i = 0; i < n - 1; i++) {
    if (c[i] == swp) {
      while (c[i + 1] != swp && i < n - 1) {
        c[i] = neg;
        c[i + 1] = swp;
        i++;
        p.push_back(i);
      }
      c[i] = c[i + 1] = neg;
      p.push_back(i + 1);
    }
  }
  cerr << c << '\n';
  cout << p.size() << '\n';
  for (auto i : p) cout << i << " ";
  return 0;
}
