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