#include <bits/stdc++.h>
using namespace std;
int n;
string s;
vector<int> v;
int main() {
  cin >> n >> s;
  string t = s;
  int x = count(s.begin(), s.end(), 'B');
  int y = count(s.begin(), s.end(), 'W');
  if (x % 2 == y % 2 && x % 2 == 1) {
    return cout << -1, 0;
  }
  if (x == n || y == n) {
    cout << "0";
    return 0;
  }
  x = n * 10 + 1;
  while (v.size() <= n * 3 && x--) {
    for (int i = 0; i < n - 1; i++) {
      if (s[i] == 'W') {
        s[i] = 'B';
        if (s[i + 1] == 'B')
          s[i + 1] = 'W';
        else
          s[i + 1] = 'B';
        v.push_back(i + 1);
      }
    }
    int cnt = count(s.begin(), s.end(), 'B');
    if (cnt == n) {
      cout << v.size() << endl;
      for (auto i : v) cout << i << " ";
      return 0;
    }
  }
  v.clear();
  s = t;
  x = n * 10 + 1;
  while (v.size() <= n * 3 && x--) {
    for (int i = 0; i < n - 1; i++) {
      if (s[i] == 'B') {
        s[i] = 'W';
        if (s[i + 1] == 'B')
          s[i + 1] = 'W';
        else
          s[i + 1] = 'B';
        v.push_back(i + 1);
      }
    }
    int cnt = count(s.begin(), s.end(), 'W');
    if (cnt == n) {
      cout << v.size() << endl;
      for (auto i : v) cout << i << " ";
      return 0;
    }
  }
  cout << -1;
}
