#include <bits/stdc++.h>
using namespace std;
const int N = 5e6 + 5;
char a[205];
const int mod = 1e9 + 7;
vector<int> ans;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  cin >> (a + 1);
  int cnt = 0;
  for (int i = 1; i <= n; i++)
    if (a[i] == 'B') cnt++;
  if (cnt % 2 == 1 && (n - cnt) % 2 == 1)
    cout << -1 << endl;
  else {
    if (cnt % 2 == 0) {
      for (int i = 1; i <= n; i++) {
        if (a[i] == 'B' && a[i + 1] == 'B') {
          ans.push_back(i);
          a[i] = 'W', a[i + 1] = 'W';
        }
      }
      for (int i = 1; i <= n; i++) {
        if (a[i] == 'B') {
          int p = -1;
          for (int j = i + 2; j <= n; j++) {
            if (a[j] == 'B') {
              p = j;
              break;
            }
          }
          for (int j = p - 1; j >= i; j--) {
            ans.push_back(j);
          }
          a[i] = 'W', a[p] = 'W';
        }
      }
      cout << ans.size() << endl;
      for (int t : ans) cout << t << " ";
    } else {
      for (int i = 1; i <= n; i++) {
        if (a[i] == 'W' && a[i + 1] == 'W') {
          ans.push_back(i);
          a[i] = 'B', a[i + 1] = 'B';
        }
      }
      for (int i = 1; i <= n; i++) {
        if (a[i] == 'W') {
          int p = -1;
          for (int j = i + 2; j <= n; j++) {
            if (a[j] == 'W') {
              p = j;
              break;
            }
          }
          for (int j = p - 1; j >= i; j--) {
            ans.push_back(j);
          }
          a[i] = 'B', a[p] = 'B';
        }
      }
      cout << ans.size() << endl;
      for (int t : ans) cout << t << " ";
    }
  }
  return 0;
}
