#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 203;
int n;
char s[N];
char t[N];
vector<int> ans;
void print() {
  printf("%d\n", (int)ans.size());
  for (int i = 0; i < (int)ans.size(); i++) {
    printf("%d%c", ans[i] + 1, " \n"[i + 1 == (int)ans.size()]);
  }
  exit(0);
}
void solve() {
  ans.clear();
  for (int i = 0; i + 1 < n; i++) {
    if (s[i] == 0) {
      ans.push_back(i);
      s[i] ^= 1;
      s[i + 1] ^= 1;
    }
  }
  if (s[n - 1] == 1) {
    print();
  }
  for (int i = n - 1; i - 1 >= 0; i--) {
    if (s[i] == 0) {
      ans.push_back(i - 1);
      s[i] ^= 1;
      s[i - 1] ^= 1;
    }
  }
  if (s[0] == 1) print();
  for (int i = 0; i + 1 < n; i++) {
    if (s[i] == 0) {
      ans.push_back(i);
      s[i] ^= 1;
      s[i + 1] ^= 1;
    }
  }
  if (s[n - 1] == 1) print();
}
int main() {
  scanf("%d %s", &n, s);
  strcpy(t, s);
  for (int i = 0; i < n; i++) s[i] = s[i] == 'B' ? 0 : 1;
  solve();
  for (int i = 0; i < n; i++) s[i] = t[i] == 'B' ? 1 : 0;
  solve();
  printf("-1\n");
}
