#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
void solve() {
  long long n;
  cin >> n;
  string s;
  cin >> s;
  long long x = 0;
  vector<long long> ans;
  for (auto &ch : s) {
    if (ch == 'B') x++;
  }
  if (x == 0 || x == n) {
    cout << 0;
    return;
  } else if ((x & 1) && ((n - x) & 1)) {
    cout << -1;
    return;
  } else {
    if (x & 1) {
      for (long long i = 0; i < n - 1; ++i) {
        if (s[i] == 'W' && s[i + 1] == 'W') {
          s[i] = 'B';
          s[i + 1] = 'B';
          ans.push_back(i);
        } else if (s[i] == 'W' && s[i + 1] == 'B') {
          s[i] = 'B';
          s[i + 1] = 'W';
          ans.push_back(i);
        }
      }
    } else if ((n - x) & 1) {
      for (long long i = 0; i < n - 1; ++i) {
        if (s[i] == 'B' && s[i + 1] == 'B') {
          s[i] = 'W';
          s[i + 1] = 'W';
          ans.push_back(i);
        } else if (s[i] == 'B' && s[i + 1] == 'W') {
          s[i] = 'W';
          s[i + 1] = 'B';
          ans.push_back(i);
        }
      }
    } else {
      for (long long i = 0; i < n - 1; ++i) {
        if (s[i] == 'W' && s[i + 1] == 'W') {
          s[i] = 'B';
          s[i + 1] = 'B';
          ans.push_back(i);
        } else if (s[i] == 'W' && s[i + 1] == 'B') {
          s[i] = 'B';
          s[i + 1] = 'W';
          ans.push_back(i);
        }
      }
    }
  }
  cout << (long long)((ans).size()) << "\n";
  for (auto mov : ans) cout << mov + 1 << " ";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long TC = 1;
  for (long long T = 1; T <= TC; ++T) {
    solve();
  }
  return 0;
}
