#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve() {
  int n;
  cin >> n;
  string str;
  cin >> str;
  vector<int> pos;
  for (int k = (1); k <= (2 * n); ++k) {
    for (int i = 0; i < (n - 1); ++i) {
      if (k == 1) {
        if (str[i] == 'W') continue;
        str[i] = 'W';
        pos.push_back(i + 1);
        if (str[i + 1] == 'B')
          str[i + 1] = 'W';
        else
          str[i + 1] = 'B';
      } else {
        if (str[i] == 'B') continue;
        str[i] = 'B';
        pos.push_back(i + 1);
        if (str[i + 1] == 'B')
          str[i + 1] = 'W';
        else
          str[i + 1] = 'B';
      }
    }
    if (str[n - 1] == 'B' and k == 1) {
      continue;
    }
    if (str[n - 1] == 'W' and k == 1) {
      cout << pos.size() << '\n';
      for (auto x : pos) cout << x << " ";
      return;
    }
    if (str[n - 1] == 'B' and k == 2) {
      cout << pos.size() << '\n';
      for (auto x : pos) cout << x << " ";
      return;
    }
  }
  cout << -1 << '\n';
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
