#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long n;
  cin >> n;
  vector<int> v;
  string a;
  cin >> a;
  int w = 0, b = 0;
  for (int i = 0; i < n; ++i) {
    if (a[i] == 'W')
      w++;
    else
      b++;
  }
  if (b % 2 == 1 && w % 2 == 1) {
    cout << -1;
    exit(0);
  } else if (b == 0 || w == 0) {
    cout << 0;
    exit(0);
  }
  char c;
  if (b % 2 == 1)
    c = 'W';
  else
    c = 'B';
  for (int i = 0; i < n - 1; ++i) {
    if (a[i] == c)
      if (a[i + 1] == a[i])
        i++;
      else {
        v.push_back(i + 1);
        swap(a[i], a[i + 1]);
      }
  }
  for (int i = 0; i < n; ++i) {
    if (a[i] == c) {
      v.push_back(i + 1);
      i += 1;
    }
  }
  cout << v.size() << '\n';
  for (int i = 0; i < v.size(); ++i) {
    cout << v[i] << ' ';
  }
  cout << '\n';
  return 0;
}
