#include <bits/stdc++.h>
using i64 = int_fast64_t;
void solve() {
  int n;
  std::cin >> n;
  std::string s;
  std::cin >> s;
  std::vector<int> ans;
  for (int i = (0); (i) < (n - 1); ++(i)) {
    if (s[i] == 'W' and s[i + 1] == 'W') {
      ans.emplace_back(i);
      s[i] = 'B', s[i + 1] = 'B';
    } else if (s[i] == 'W' and s[i + 1] == 'B') {
      ans.emplace_back(i);
      s[i] = 'B', s[i + 1] = 'W';
    }
  }
  if (s.back() == 'B') {
    std::cout << ans.size() << std::endl;
    for (int i = (0); (i) < (ans.size()); ++(i))
      std::cout << ans[i] + 1 << " \n"[i + 1 == ans.size()];
  } else {
    if (s.size() % 2 == 0) {
      std::cout << "-1" << std::endl;
      return;
    } else {
      for (int i = (0); (i) < (s.size() / 2); ++(i)) {
        s[2 * i] = 'W', s[2 * i + 1] = 'W';
        ans.push_back(2 * i);
      }
    }
    std::cout << ans.size() << std::endl;
    for (int i = (0); (i) < (ans.size()); ++(i))
      std::cout << ans[i] + 1 << " \n"[i + 1 == ans.size()];
  }
}
int main() {
  std::cin.tie(nullptr);
  solve();
  return 0;
}
