#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, c = 0, c1 = 0;
  cin >> n;
  string s, s1;
  cin >> s;
  s1 = s;
  vector<long long> v, v1;
  for (long long i = 0; i < n - 1; i++) {
    if (s[i] == 'B') {
      s[i] = 'W';
      v.push_back(i + 1);
      if (s[i + 1] == 'B')
        s[i + 1] = 'W';
      else
        s[i + 1] = 'B';
    }
  }
  for (long long i = 0; i < n - 1; i++) {
    if (s1[i] == 'W') {
      s1[i] = 'B';
      v1.push_back(i + 1);
      if (s1[i + 1] == 'B')
        s1[i + 1] = 'W';
      else
        s1[i + 1] = 'B';
    }
  }
  for (long long i = 0; i < n; i++) {
    if (s[i] == 'W') c++;
  }
  for (long long i = 0; i < n; i++) {
    if (s1[i] == 'B') c1++;
  }
  if (c != n && c1 != n)
    cout << "-1";
  else {
    if (c == n) {
      cout << v.size() << endl;
      for (long long i = 0; i < v.size(); i++) cout << v[i] << " ";
      return 0;
    }
    if (c1 == n) {
      cout << v1.size() << endl;
      for (long long i = 0; i < v1.size(); i++) cout << v1[i] << " ";
      return 0;
    }
  }
}
