#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e2 + 20;
int n;
vector<int> ans;
char s[MAXN], s1[MAXN];
char convert(char a) {
  if (a == 'B')
    return 'W';
  else
    return 'B';
}
int main() {
  cin >> n;
  scanf("%s", s);
  for (int i = 0; i < n; ++i) {
    s1[i] = s[i];
  }
  for (int i = 0; i < n - 1; ++i) {
    if (s[i] == 'W') {
      s[i] = convert(s[i]), s[i + 1] = convert(s[i + 1]);
      ans.push_back(i + 1);
    }
  }
  if (s[n - 1] == 'B') {
    cout << ans.size() << endl;
    for (int i = 0; i < ans.size(); ++i) {
      cout << ans[i] << " ";
    }
    puts("");
    return 0;
  }
  ans.clear();
  for (int i = 0; i < n - 1; ++i) {
    if (s1[i] == 'B') {
      s1[i] = convert(s1[i]), s1[i + 1] = convert(s1[i + 1]);
      ans.push_back(i + 1);
    }
  }
  if (s1[n - 1] == 'W') {
    cout << ans.size() << endl;
    for (int i = 0; i < ans.size(); ++i) {
      cout << ans[i] << " ";
    }
    puts("");
    return 0;
  } else {
    puts("-1");
  }
}
