#include <bits/stdc++.h>
using namespace std;
void change(char &x) {
  if (x == 'B')
    x = 'W';
  else
    x = 'B';
}
int main() {
  string s;
  int n;
  cin >> n;
  cin >> s;
  int w = 0, b = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'B')
      b++;
    else
      w++;
  }
  if (b % 2 != 0 && w % 2 != 0) {
    cout << -1;
    return 0;
  }
  string c = s;
  vector<int> vec1, vec2;
  for (int i = 0; i < n - 1; i++) {
    if (s[i] == 'B') {
      vec1.push_back(i + 1);
      if (s[i] == 'B') change(s[i]);
      change(s[i + 1]);
    }
  }
  if (s[n - 1] == 'W') {
    cout << vec1.size() << endl;
    for (int i = 0; i < vec1.size(); i++) cout << vec1[i] << " ";
    return 0;
  }
  for (int i = 0; i < n - 1; i++) {
    if (c[i] == 'W') {
      vec2.push_back(i + 1);
      change(c[i]);
      change(c[i + 1]);
    }
  }
  if (s[n - 1] == 'B') {
    cout << vec2.size() << endl;
    for (int i = 0; i < vec2.size(); i++) cout << vec2[i] << " ";
    return 0;
  }
  return 0;
}
