#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
map<char, char> m;
int a[N];
int main() {
  int n, cnt = 0, t;
  string s, s1;
  cin >> n >> s;
  m['B'] = 'W';
  m['W'] = 'B';
  s1 = s;
  t = 0;
  for (int i = 0; i < n - 1; i++) {
    if (s[i] == 'B') {
      a[cnt++] = i + 1;
      s[i] = m[s[i]];
      s[i + 1] = m[s[i + 1]];
    }
  }
  for (int i = 0; i < n; i++) {
    if (s[i] == 'W') continue;
    t = 1;
  }
  if (t == 0) {
    cout << cnt << endl;
    for (int i = 0; i < cnt; i++) printf("%d ", a[i]);
    printf("\n");
    return 0;
  }
  t = cnt = 0;
  for (int i = 0; i < n - 1; i++) {
    if (s1[i] == 'W') {
      a[cnt++] = i + 1;
      s1[i] = m[s1[i]];
      s1[i + 1] = m[s1[i + 1]];
    }
  }
  for (int i = 0; i < n; i++) {
    if (s1[i] == 'B') continue;
    t = 1;
  }
  if (t == 0) {
    cout << cnt << endl;
    for (int i = 0; i < cnt; i++) printf("%d ", a[i]);
    printf("\n");
    return 0;
  }
  printf("-1\n");
  return 0;
}
