#include <bits/stdc++.h>
const long long MOD = 1000 * 1000 * 1000 + 7;
const long long MOD1 = 998244353;
using namespace std;
long long power(unsigned long long x, unsigned long long y) {
  unsigned long long res = 1;
  while (y > 0) {
    if (y & 1) res = (unsigned long long)(res * x);
    y = y >> 1;
    if (x <= 100000000) x = (unsigned long long)(x * x);
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long N;
  string S;
  cin >> N;
  cin >> S;
  vector<long long> pos;
  for (int i = 0; i < S.length() - 1; i++) {
    if (S[i] == 'B') continue;
    if (S[i] == 'W' && S[i + 1] == 'B') {
      S[i] = 'B';
      S[i + 1] = 'W';
      pos.push_back(i + 1);
    }
    if (S[i] == 'W' && S[i + 1] == 'W') {
      S[i] = 'B';
      S[i + 1] = 'B';
      pos.push_back(i + 1);
    }
  }
  if (S[N - 1] == 'B') {
    cout << pos.size() << '\n';
    for (int(i) = (0); (i) < (pos.size()); ++(i)) cout << pos[i] << ' ';
  } else {
    for (int i = N - 1; i >= 1; i--) {
      if (S[i] == 'W') continue;
      if (S[i] == 'B' && S[i - 1] == 'W') {
        S[i] = 'W';
        S[i - 1] = 'B';
        pos.push_back(i);
      }
      if (S[i] == 'B' && S[i - 1] == 'B') {
        S[i] = 'W';
        S[i - 1] = 'W';
        pos.push_back(i);
      }
    }
    if (S[0] == 'B')
      cout << -1;
    else {
      cout << pos.size() << '\n';
      for (int(i) = (0); (i) < (pos.size()); ++(i)) {
        cout << pos[i] << ' ';
      }
    }
  }
  return 0;
}
