#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int cnt1 = 0, cnt2 = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'W')
      cnt1++;
    else
      cnt2++;
  }
  if (cnt1 % 2 == 1 && cnt2 % 2 == 1) {
    cout << -1;
    return;
  }
  if (cnt1 & 1) {
    for (int i = 0; i < s.size(); i++) {
      if (s[i] == 'W')
        s[i] = 'B';
      else
        s[i] = 'W';
    }
  }
  vector<int> v;
  for (int i = 0; i < n - 1; i++) {
    if (s[i] == 'W' && s[i + 1] == 'W') {
      v.push_back(i);
      s[i] = 'B';
      s[i + 1] = 'B';
    }
  }
  bool flag = 0;
  for (int i = 0; i < n - 1; i++) {
    if (flag == 0 && s[i] == 'W') {
      v.push_back(i);
      s[i + 1] = 'W';
      s[i] = 'B';
      flag = 1;
    } else if (flag == 1) {
      if (s[i + 1] == 'W') {
        v.push_back(i);
        s[i + 1] = 'B';
        s[i] = 'B';
        flag = 0;
      } else {
        v.push_back(i);
        s[i + 1] = 'W';
        s[i] = 'B';
      }
    }
  }
  cout << v.size() << '\n';
  for (int i = 0; i < v.size(); i++) {
    cout << v[i] + 1 << " ";
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t = 1;
  while (t--) {
    solve();
  }
}
