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