#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string str;
  cin >> str;
  int cw = 0, cb = 0;
  for (int i = 0; i < n; i++) {
    if (str[i] == 'W')
      cw++;
    else
      cb++;
  }
  if (cb % 2 != 0 && cw % 2 != 0) {
    cout << "-1" << endl;
    return 0;
  }
  vector<int> ans;
  while (!(cb == 0 || cw == 0)) {
    if (cb < cw) {
      for (int i = 0; i < n - 1; i++) {
        if (str[i] == 'W') {
          ans.push_back(i + 1);
          str[i] = 'B';
          if (str[i + 1] == 'B') {
            str[i + 1] = 'W';
          } else {
            str[i + 1] = 'B';
          }
        }
      }
      cw = cb = 0;
      for (int i = 0; i < n; i++) {
        if (str[i] == 'W')
          cw++;
        else
          cb++;
      }
    } else {
      for (int i = 0; i < n - 1; i++) {
        if (str[i] == 'B') {
          ans.push_back(i + 1);
          str[i] = 'W';
          if (str[i + 1] == 'B') {
            str[i + 1] = 'W';
          } else {
            str[i + 1] = 'B';
          }
        }
      }
      cw = cb = 0;
      for (int i = 0; i < n; i++) {
        if (str[i] == 'W')
          cw++;
        else
          cb++;
      }
    }
  }
  cout << ans.size() << endl;
  for (auto c : ans) cout << c << " ";
  return 0;
}
