#include <bits/stdc++.h>
using namespace std;
long long int xpow(long long int a, long long int b) {
  if (b == 0) return 1;
  if (b % 2 == 0) {
    long long int k = xpow(a, b / 2);
    return k * k;
  }
  if (b % 2 != 0) return a * xpow(a, b - 1);
}
void display(vector<int> v) {
  for (auto k : v) cout << k << " ";
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n;
  cin >> n;
  string s;
  cin >> s;
  string temp = s;
  vector<int> ans;
  for (int i = 0; i < n - 1; i++) {
    if (s[i] == 'B') {
      s[i] = 'W';
      ans.push_back(i + 1);
      if (s[i + 1] == 'B')
        s[i + 1] = 'W';
      else
        s[i + 1] = 'B';
    }
  }
  vector<int> ans1;
  for (int i = 0; i < n - 1; i++) {
    if (temp[i] == 'W') {
      temp[i] = 'B';
      ans1.push_back(i + 1);
      if (temp[i + 1] == 'W')
        temp[i + 1] = 'B';
      else
        temp[i + 1] = 'W';
    }
  }
  set<char> se1, se2;
  for (auto c : s) se1.insert(c);
  for (auto c : temp) se2.insert(c);
  if (se1.size() == 1) {
    cout << ans.size() << endl;
    display(ans);
  } else if (se2.size() == 1) {
    cout << ans1.size() << endl;
    display(ans1);
  } else
    cout << "-1" << endl;
  return 0;
}
