1 1000000000 7
1000000000 9
 3 2 2
2 4
2 1
3 6
 2 1000000000 100000
1000000000 1000000
1000000000 10000
 1 100 100
50 70
 1 100 100
101 100

1
1000000000 8 2
2 3 1
1000000000 100001 1
99 100 1
101 100
#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 9;
const int mod = 1e9 + 7;
vector<int> v;
int main() {
  int n, i, cntb, cntw, f = 0, t;
  string s;
  n = ({
    int a;
    scanf("%d", &a);
    a;
  });
  cin >> s;
  t = 3 * n;
  while (t--) {
    f = 0;
    for (i = 1; i < n; i++) {
      if (s[i - 1] != s[i]) f = 1;
    }
    if (!f) break;
    for (i = 0; i < n - 1; i++) {
      if (s[i] == s[i + 1]) {
        if (s[i + 1] == 'W') {
          s[i] = 'B';
          s[i + 1] = 'B';
        } else {
          s[i] = 'W';
          s[i + 1] = 'W';
        }
        v.emplace_back(i + 1);
        i++;
      } else if (s[i] != s[0]) {
        s[i] = s[0];
        if (s[i + 1] == 'W')
          s[i + 1] = 'B';
        else
          s[i + 1] = 'W';
        v.emplace_back(i + 1);
        i++;
      }
    }
  }
  if (t == -1)
    cout << -1 << endl;
  else {
    cout << v.size() << '\n';
    for (i = 0; i < v.size(); i++) cout << v[i] << " ";
  }
}
