#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n;
  cin >> n;
  string s;
  cin >> s;
  string t = s;
  long long o = 0;
  vector<long long> v;
  for (long long i = 0; i < s.size() - 1; i++) {
    if (s[i] == 'B') {
      o++;
      v.push_back(i);
      s[i] = 'W';
      if (s[i + 1] == 'W')
        s[i + 1] = 'B';
      else
        s[i + 1] = 'W';
    }
  }
  if (s[n - 1] == 'W') {
    cout << o << endl;
    for (auto i : v) cout << i + 1 << " ";
  } else {
    s = t;
    vector<long long> v1;
    long long o1 = 0;
    for (long long i = 0; i < s.size() - 1; i++) {
      if (s[i] == 'W') {
        o1++;
        v1.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 << o1 << endl;
      for (auto i : v1) cout << i + 1 << " ";
    } else
      cout << "-1";
  }
}
