#include <bits/stdc++.h>
#pragma GCC optimize("O2")
using namespace std;
const long long INF = 1e15 + 7;
const long long N = 2e5 + 10;
const long long mod = 998244353;
long long pow(long long x, long long y) {
  long long res = 1;
  while (y > (long long)0) {
    if (y & (long long)1) res = ((res) * (x));
    y = y >> (long long)1;
    x = ((x) * (x));
  }
  return res;
}
long long powm(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > (long long)0) {
    if (y & (long long)1) res = (res * x) % p;
    y >>= (long long)1;
    x = (x * x) % p;
  }
  return res;
}
void solve() {
  long long n;
  cin >> n;
  string s;
  cin >> s;
  long long w = 0, b = 0;
  vector<long long> v;
  for (long long i = 0; i < n; i++) {
    if (s[i] == 'B')
      b++;
    else
      w++;
  }
  if (b % 2 != 0 && w % 2 != 0) {
    cout << -1 << endl;
    return;
  }
  if (b % 2 == 0) {
    for (long long i = 0; i < n - 1; i++) {
      if (s[i] == 'B') {
        s[i] = 'W';
        if (s[i + 1] == 'B')
          s[i + 1] = 'W';
        else
          s[i + 1] = 'B';
        v.push_back(i + 1);
      }
    }
  } else if (w % 2 == 0) {
    for (long long i = 0; i < n - 1; i++) {
      if (s[i] == 'W') {
        s[i] = 'B';
        if (s[i + 1] == 'B')
          s[i + 1] = 'W';
        else
          s[i + 1] = 'B';
        v.push_back(i + 1);
      }
    }
  }
  cout << v.size() << endl;
  for (auto i : v) cout << i << " ";
  cout << endl;
  return;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long ts = 1;
  while (ts--) {
    solve();
  }
}
