#include <bits/stdc++.h>
using namespace std;
int check(int* a, int n) {
  for (int i = 0; i < n; i++)
    if (a[i] == 0) return i;
  return -1;
}
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int one = 0, zer = 0;
  for (int i = 0; i < n; i++)
    if (s[i] == 'W')
      one++;
    else
      zer++;
  if (one % 2 && zer % 2) {
    printf("-1\n");
    return 0;
  }
  if (one == 0 || zer == 0) {
    printf("0");
    return 0;
  }
  int ii = -1, a[n];
  if (zer % 2) {
    for (int i = 0; i < n; i++) {
      if (s[i] == 'W') {
        a[i] = 0;
        if (ii == -1) ii = i;
      } else
        a[i] = 1;
    }
    swap(one, zer);
  } else {
    for (int i = 0; i < n; i++) {
      if (s[i] == 'W') {
        a[i] = 1;
      } else {
        if (ii == -1) ii = i;
        a[i] = 0;
      }
    }
  }
  vector<int> v;
  while (ii != -1) {
    v.push_back(ii);
    a[ii] = a[ii] ^ 1;
    a[ii + 1] = a[ii + 1] ^ 1;
    ii = check(a, n);
  }
  printf("%ld\n", v.size());
  for (int i = 0; i < v.size(); i++) printf("%d ", v[i] + 1);
}
