#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long power(long long x, long long n) {
  if (n == 0) return 1;
  if (n == 1) return x % mod;
  if (n % 2 == 0) {
    long long y = power(x, n / 2) % mod;
    return (y * y) % mod;
  }
  if (n & 1) {
    long long y = power(x, n - 1);
    return (x % mod * y % mod) % mod;
  }
  return 0;
}
long long dx[] = {-1, 0, 1, 0, -1, -1, 1, 1};
long long dy[] = {0, 1, 0, -1, -1, 1, 1, -1};
const long long maxn = 200005;
void solve() {
  long long n, i, j, k, m;
  cin >> n;
  string s;
  cin >> s;
  vector<long long> ans;
  i = 0;
  if (s[0] == 'W') i++;
  for (i; i < n - 1; i++) {
    if (s[i] == 'B') {
      ans.push_back(i);
      s[i] = 'W';
      if (s[i + 1] == 'B')
        s[i + 1] = 'W';
      else
        s[i + 1] = 'B';
    }
  }
  if (s[n - 1] == 'W') {
    cout << (long long)ans.size() << '\n';
    for (long long x : ans) cout << x + 1 << " ";
    exit(0);
  }
  i = 0;
  if (s[0] == 'B') i++;
  for (i; i < n - 1; i++) {
    if (s[i] == 'W') {
      ans.push_back(i);
      s[i] = 'B';
      if (s[i + 1] == 'B')
        s[i + 1] = 'W';
      else
        s[i + 1] = 'B';
    }
  }
  if (s[n - 1] == 'B') {
    cout << (long long)ans.size() << '\n';
    for (long long x : ans) cout << x + 1 << " ";
    exit(0);
  }
  cout << -1;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long t = 1;
  while (t--) solve();
  return 0;
}
