#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  string s;
  cin >> s;
  int countb = 0;
  int countw = 0;
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] == 'B')
      countb++;
    else if (s[i] == 'W')
      countw++;
  }
  if (countb == n or countw == n) {
    cout << 0 << endl;
    return 0;
  }
  int count = 0;
  if (countw % 2 != 0 && countb % 2 != 0) {
    cout << -1 << endl;
    return 0;
  } else {
    if (countb % 2 == 0) {
      vector<int> v;
      for (int i = 0; i < n - 1; ++i) {
        if (s[i] == 'B') {
          count++;
          s[i] = (s[i] == 'B') ? 'W' : 'B';
          s[i + 1] = (s[i + 1] == 'B') ? 'W' : 'B';
          v.push_back(i + 1);
        }
      }
      cout << count << endl;
      for (int i = 0; i < v.size(); ++i) {
        cout << v[i] << " ";
      }
    } else if (countw % 2 == 0) {
      vector<int> v;
      for (int i = 0; i < n - 1; ++i) {
        if (s[i] == 'W') {
          count++;
          s[i] = (s[i] == 'B') ? 'W' : 'B';
          s[i + 1] = (s[i + 1] == 'B') ? 'W' : 'B';
          v.push_back(i + 1);
        }
      }
      cout << count << endl;
      for (int i = 0; i < v.size(); ++i) {
        cout << v[i] << " ";
      }
    }
  }
}
