#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s, s1;
  int count = 0, count1 = 0;
  vector<int> v, v1;
  cin.ignore(255, '\n');
  getline(cin, s);
  s1 = s;
  for (int i = 0; i < s.size() - 1; i++) {
    if (s[i] == 'B') {
      s[i] = 'W';
      s[i + 1] == 'W' ? s[i + 1] = 'B' : s[i + 1] = 'W';
      count++;
      v.push_back(i + 1);
    }
  }
  if (s[s.size() - 1] == s[s.size() - 2]) {
    cout << count << '\n';
    for (int i = 0; i < v.size(); i++) cout << v[i] << ' ';
    return 0;
  }
  for (int i = 0; i < s1.size() - 1; i++) {
    if (s1[i] == 'W') {
      s1[i] = 'B';
      s1[i + 1] == 'B' ? s1[i + 1] = 'W' : s1[i + 1] = 'B';
      count1++;
      v1.push_back(i + 1);
    }
  }
  if (s1[s1.size() - 1] == s1[s1.size() - 2]) {
    cout << count1 << '\n';
    for (int i = 0; i < v1.size(); i++) cout << v1[i] << ' ';
    return 0;
  }
  cout << "-1";
  return 0;
}
