#include <bits/stdc++.h>
using namespace std;
vector<int> v;
bool slove(string s, char co, char nc) {
  v.clear();
  for (int i = 0; i < s.length() - 1; ++i) {
    if (s[i] != co) {
      s[i] = co;
      if (s[i + 1] != co)
        s[i + 1] = co;
      else
        s[i + 1] = nc;
      v.push_back(i + 1);
    }
  }
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] != co) return false;
  }
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); ++i) {
    cout << v[i] << " ";
  }
  return true;
}
int main() {
  int n;
  cin >> n;
  getchar();
  string s;
  cin >> s;
  if (slove(s, 'B', 'W'))
    return 0;
  else if (slove(s, 'W', 'B'))
    return 0;
  else
    cout << "-1";
  return 0;
}
