#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  string s;
  cin >> n >> s;
  int white = count(s.begin(), s.end(), 'W');
  int black = count(s.begin(), s.end(), 'B');
  if (white % 2 && black % 2) {
    cout << "-1" << endl;
    return;
  }
  if (white == s.size() || black == s.size()) {
    cout << "0" << endl;
    return;
  }
  vector<int> v;
  if (white % 2) {
    for (int i = 0; i < n - 1; i++) {
      if (s[i] == 'B') {
        v.push_back(i + 1);
        if (s[i + 1] == 'B') {
          i++;
        } else {
          s[i + 1] = 'B';
        }
      }
    }
  } else {
    for (int i = 0; i < n - 1; i++) {
      if (s[i] == 'W') {
        v.push_back(i + 1);
        if (s[i + 1] == 'W') {
          i++;
        } else {
          s[i + 1] = 'W';
        }
      }
    }
  }
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
  cout << endl;
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  solve();
  return 0;
}
