#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    if (i < n - 1) {
      if (s[i] == 'W') continue;
      if (s[i + 1] == 'B') {
        ans.push_back(i + 1);
        s[i] = 'W';
        s[i + 1] = 'W';
      } else {
        ans.push_back(i + 1);
        s[i] = 'W';
        s[i + 1] = 'B';
      }
    }
  }
  if (s[n - 1] == 'B') {
    if (n & 1) {
      for (int i = 1; i < n; i += 2) ans.push_back(i);
    } else {
      cout << -1;
      return 0;
    }
  }
  cout << ans.size() << "\n";
  for (int it : ans) cout << it << ' ';
}
