#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long T = 1;
  while (T--) {
    long long n, b = 0, w = 0;
    cin >> n;
    string s;
    cin >> s;
    for (long long i = 0; i < n; i++) {
      if (s[i] == 'B')
        b++;
      else
        w++;
    }
    if (b % 2 && w % 2) {
      cout << "-1\n";
      continue;
    }
    vector<long long> v;
    for (long long i = 0; i < n - 1; i++) {
      if (s[i] == 'W') {
        v.push_back(i + 1);
        s[i + 1] = (s[i + 1] == 'B') ? 'W' : 'B';
      }
    }
    if (s[n - 1] == 'W')
      for (long long i = 0; i < n - 2; i += 2) v.push_back(i + 1);
    cout << v.size() << "\n";
    for (long long i = 0; i < v.size(); i++) cout << v[i] << " ";
    cout << "\n";
  }
  return 0;
}
