#include <bits/stdc++.h>
using namespace std;
long long a, b, c, d, e, f;
int n;
string s;
void kaisa() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  cin >> s;
  s = " " + s;
  int dem1 = 0, dem2 = 0;
  for (int i = 1; i <= n; i++) {
    if (s[i] == 'B')
      dem1++;
    else
      dem2++;
  }
  if (dem1 == 0 || dem2 == 0) {
    cout << 0;
    return;
  }
  if (dem1 % 2 == 0) {
    vector<int> res;
    for (int i = 1; i < n; i++) {
      if (s[i] == 'B') {
        s[i] = 'W';
        if (s[i + 1] == 'W')
          s[i + 1] = 'B';
        else
          s[i + 1] = 'W';
        res.push_back(i);
      }
    }
    cout << res.size() << "\n";
    for (int i : res) {
      cout << i << " ";
    }
    return;
  }
  if (dem2 % 2 == 0) {
    vector<int> res;
    for (int i = 1; i < n; i++) {
      if (s[i] == 'W') {
        s[i] = 'B';
        if (s[i + 1] == 'W')
          s[i + 1] = 'B';
        else
          s[i + 1] = 'W';
        res.push_back(i);
      }
    }
    cout << res.size() << "\n";
    for (int i : res) {
      cout << i << " ";
    }
    return;
  } else {
    cout << -1;
  }
}
int main() {
  kaisa();
  return 0;
}
