#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<bool> cub(n);
  char c;
  for (int i = 0; i < n; i++) {
    cin >> c;
    if (c == 'W')
      cub[i] = 1;
    else
      cub[i] = 0;
  }
  vector<int> ans;
  for (int i = 0; i < n - 1; i++) {
    if (cub[i]) {
      cub[i] = 0;
      if (cub[i + 1])
        cub[i + 1] = 0;
      else
        cub[i + 1] = 1;
      ans.push_back(i + 1);
    }
  }
  if (cub[n - 1] == 0) {
    cout << ans.size() << '\n';
    for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  } else {
    for (int i = 0; i < n - 1; i++) {
      if (cub[i] == 0) {
        cub[i] = 1;
        if (cub[i + 1])
          cub[i + 1] = 0;
        else
          cub[i + 1] = 1;
        ans.push_back(i + 1);
      }
    }
    if (cub[n - 1] == 1) {
      cout << ans.size() << '\n';
      for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
    } else {
      cout << -1;
    }
  }
  return 0;
}
