#include <bits/stdc++.h>
using namespace std;
long long n, arr[200 + 5];
vector<long long> ans;
string s;
bool tf = 1;
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cin >> n >> s;
  for (long long i = 0; i < n; i++) {
    if (s[i] == 'B')
      arr[i] = 0;
    else
      arr[i] = 1;
  }
  for (long long i = 1; i < n - 1; i++) {
    if (arr[i] != arr[i - 1]) {
      arr[i] = !arr[i];
      arr[i + 1] = !arr[i + 1];
      ans.push_back(i + 1);
    }
  }
  for (long long i = n - 2; i > 0; i--) {
    if (arr[i] != arr[i + 1]) {
      arr[i] = !arr[i];
      arr[i - 1] = !arr[i - 1];
      ans.push_back(i);
    }
  }
  for (long long i = 1; i < n; i++) {
    if (arr[i] != arr[i - 1]) tf = 0;
  }
  if (!tf)
    cout << -1 << '\n';
  else {
    cout << ans.size() << '\n';
    for (long long i : ans) {
      cout << i << " ";
    }
    cout << '\n';
  }
}
