#include <bits/stdc++.h>
using namespace std;
long long t, n;
string s;
long long max(long long a, long long b, long long c) {
  return max(a, max(b, c));
}
long long min(long long a, long long b, long long c) {
  return min(a, min(b, c));
}
long long fspow(long long x, long long y) {
  long long ans;
  if (y == 0) return 1;
  ans = fspow(x, y / 2);
  if (y % 2 == 0) return ans * ans;
  return x * ans * ans;
}
long long gcd(long long x, long long y) {
  if (x < y) swap(x, y);
  if (y == 0) return x;
  return gcd(x % y, y);
}
long long p2(long long x) {
  long long ans = 0;
  while (x >= 1) {
    ans++;
    x /= 2;
  }
  return ans;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  t = 1;
  while (t--) {
    cin >> n;
    cin >> s;
    n = s.size();
    long long nb = 0, nw = 0;
    for (long long i = 0; i < n; i++) {
      if (s[i] == 'B')
        nb++;
      else
        nw++;
    }
    if (nb == 0 || nw == 0) {
      cout << 0 << endl;
      continue;
    }
    if (nw & 1 && nb & 1) {
      cout << -1 << endl;
      continue;
    }
    vector<long long> ps;
    char c;
    if (nb % 2 == 0)
      c = 'B';
    else
      c = 'W';
    long long k = 0;
    for (long long i = 0; i < n; i++) {
      if (s[i] == c) ps.push_back(i + 1);
    }
    for (long long i = 1; i < ps.size(); i += 2) k += ps[i] - ps[i - 1];
    cout << k << endl;
    for (long long i = 0; i < ps.size(); i += 2) {
      for (long long j = ps[i]; j < ps[i + 1]; j++) {
        cout << j << " ";
      }
    }
    cout << endl;
  }
}
