#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int mod = 998244353;
const double PI = acos(-1);
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int c = 0;
  vector<int> v;
  for (int i = (0); i < (n - 1); i++) {
    if (s[i] == 'B' && s[i + 1] == 'W') {
      s[i] = 'W';
      s[i + 1] = 'B';
      v.push_back(i + 1);
      c += 1;
    } else if (s[i] == 'B' && s[i + 1] == 'B') {
      s[i] = 'W';
      s[i + 1] = 'W';
      v.push_back(i + 1);
      c++;
    }
  }
  if (s[n - 1] == 'B') {
    if (n % 2 == 0) {
      cout << -1;
      return 0;
    } else {
      for (int i = 0; i < n - 1; i += 2) {
        v.push_back(i + 1);
        c++;
      }
    }
  }
  cout << c << endl;
  for (auto i : v) {
    cout << i << " ";
  }
  return 0;
}
