#include <bits/stdc++.h>
using namespace std;
int debug = 1;
int test = 1;
long double pi = 3.14159265358979323846;
inline long long int min2(long long a, long long b) {
  if (a < b) {
    return a;
  }
  return b;
}
inline long long max3(long long a, long long b, long long c) {
  return (a) > (b) ? ((a) > (c) ? (a) : (c)) : ((b) > (c) ? (b) : (c));
}
inline long long min3(long long a, long long b, long long c) {
  return (a) < (b) ? ((a) < (c) ? (a) : (c)) : ((b) < (c) ? (b) : (c));
}
long long extgcd(long long a, long long b, long long &x, long long &y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  long long d = extgcd(b, a % b, y, x);
  y -= a / b * x;
  return d;
}
inline long long mod(long long a, long long m) { return (a % m + m) % m; }
long long modinv(long long a) {
  long long x, y;
  extgcd(a, 1000000007, x, y);
  return mod(x, 1000000007);
}
long long gcd(long long u, long long v) {
  long long r;
  while (0 != v) {
    r = u % v;
    u = v;
    v = r;
  }
  return u;
}
long long lcm(long long u, long long v) { return u / gcd(u, v) * v; }
void get_all_factors(int a[], long long int n) {
  long long int w = sqrt(n);
  for (int i = 1; i <= w; i++) {
    if (n % i == 0) {
      a[i]++;
      a[n / i]++;
    }
  }
  long long int x = ceil(sqrt(n));
  if (sqrt(n) == ceil(sqrt(n))) a[(int)sqrt(n)]--;
}
long long int memo[100000][110] = {0};
long long C(long long n, long long r) {
  if (r == 0 || r == n) return 1;
  if (memo[n][r] != -1) return memo[n][r];
  return memo[n][r] =
             (C(n - 1, r - 1) % 1000000007 + C(n - 1, r) % 1000000007) %
             1000000007;
}
int valid(string s, int i) {
  if (s == "lol" or i == -1000050000) {
    return 0;
  }
  return 1;
}
void status(string s1 = "lol", long long int i1 = -1000050000,
            string s2 = "lol", long long int i2 = -1000050000,
            string s3 = "lol", long long int i3 = -1000050000) {
  if (debug) {
    if (valid(s1, i1)) {
      cout << s1 << "=" << i1 << "  ";
    }
    if (valid(s2, i2)) {
      cout << s2 << "=" << i2 << "  ";
    }
    if (valid(s3, i3)) {
      cout << s3 << "=" << i3 << "  ";
    }
    cout << endl;
  }
}
long long int poww(long long x, long long y) {
  long long res = 1;
  while (y) {
    if (y & 1) res = res * x;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
long long int powm(long long x, long long y, long long m = 1000000007) {
  x = x % m;
  long long res = 1;
  while (y) {
    if (y & 1) res = res * x;
    res %= m;
    y = y >> 1;
    x = x * x;
    x %= m;
  }
  return res % m;
}
vector<vector<long long int> > multiply(vector<vector<long long int> > &a,
                                        vector<vector<long long int> > &b) {
  vector<vector<long long int> > c(a.size(),
                                   vector<long long int>(b[0].size()));
  assert(a[0].size() == b.size());
  long long int mod = 1000000007;
  for (int i = 0; i < a.size(); i++) {
    for (int j = 0; j < b[0].size(); j++) {
      c[i][j] = 0;
      for (int k = 0; k < a[0].size(); k++) {
        c[i][j] += (a[i][k] * b[k][j]) % mod;
        c[i][j] %= mod;
      }
    }
  }
  return c;
}
vector<vector<long long int> > fastmatrix(vector<vector<long long int> > &a,
                                          long long int n) {
  if (n == 1) {
    return a;
  }
  if (n == 0) {
    vector<vector<long long int> > k = a;
    for (int i = 0; i < a.size(); i++) {
      for (int j = 0; j < a[i].size(); j++) {
        k[i][j] = 1;
      }
    }
    return k;
  }
  if (n % 2 == 1) {
    vector<vector<long long int> > k = fastmatrix(a, n / 2);
    vector<vector<long long int> > kk = multiply(k, k);
    kk = multiply(kk, a);
    return kk;
  } else {
    vector<vector<long long int> > k = fastmatrix(a, n / 2);
    vector<vector<long long int> > kk = multiply(k, k);
    return kk;
  }
}
vector<long long int> prime(10000000, 1);
void sieve() {
  for (int i = 2; i <= 10000; i++) {
    if (prime[i]) {
      for (int j = i * i; j < 10000000; j += i) {
        prime[j] = 0;
      }
    }
  }
}
class comp {
 public:
  bool operator()(pair<long long int, pair<long long int, long long int> > &a,
                  pair<long long int, pair<long long int, long long int> > &b) {
    if (a.first == b.first) {
      return a.second.first > b.second.first;
    }
    return a.first < b.first;
  }
};
long long int getsum(long long int x) { return (x * (x + 1)) / 2; }
void filereader() {}
int comp(int a, int b) { return a > b; }
int main() {
  filereader();
  debug = 0;
  test = 0;
  int tt = 1;
  if (test) {
    cin >> tt;
  }
  while (tt--) {
    int n;
    cin >> n;
    string second;
    cin >> second;
    int bcnt = 0, wcnt = 0;
    vector<pair<long long int, pair<long long int, long long int> > > pre;
    int i = 0;
    while (1) {
      int s, e;
      s = i;
      int f = 0;
      while (i < n and second[i] == 'B') {
        bcnt++;
        i++;
      }
      e = i - 1;
      if (e >= s) {
        f = 1;
        pre.push_back(make_pair('B', make_pair(s, e)));
      }
      s = i;
      while (i < n and second[i] == 'W') {
        wcnt++;
        i++;
      }
      e = i - 1;
      if (e - s >= 0) {
        f = 1;
        pre.push_back(make_pair('W', make_pair(s, e)));
      }
      if (i == n) {
        break;
      }
    }
    if (pre.size() == 1) {
      cout << 0 << endl;
      return 0;
    }
    vector<long long int> moves;
    int rem = 0;
    if (bcnt % 2 == 0) {
      for (int i = 0; i < pre.size(); i++) {
        if (pre[i].first == 'B') {
          int s = pre[i].second.first;
          int e = pre[i].second.second;
          int cnt = e - s + 1;
          int j = s;
          if (rem == 2) {
            j++;
          }
          while (j <= e) {
            moves.push_back(j);
            j += 2;
          }
          if (rem == 2) {
            if (cnt % 2 == 0) {
              rem = 1;
            } else {
              rem = 0;
            }
          } else {
            rem = cnt % 2;
          }
        } else {
          if (rem > 0) {
            rem++;
            int s = pre[i].second.first;
            int e = pre[i].second.second;
            int cnt = e - s + 1;
            int j = s;
            while (j <= e) {
              moves.push_back(j);
              j += 1;
            }
          }
        }
      }
    } else if (wcnt % 2 == 0) {
      for (int i = 0; i < pre.size(); i++) {
        if (pre[i].first == 'W') {
          int s = pre[i].second.first;
          int e = pre[i].second.second;
          int cnt = e - s + 1;
          int j = s;
          if (rem == 2) {
            j++;
          }
          while (j <= e) {
            moves.push_back(j);
            j += 2;
          }
          if (rem == 2) {
            if (cnt % 2 == 0) {
              rem = 1;
            } else {
              rem = 0;
            }
          } else {
            rem = cnt % 2;
          }
        } else {
          if (rem > 0) {
            rem++;
            int s = pre[i].second.first;
            int e = pre[i].second.second;
            int cnt = e - s + 1;
            int j = s;
            while (j <= e) {
              moves.push_back(j);
              j += 1;
            }
          }
        }
      }
    } else {
      cout << -1 << endl;
      return 0;
    }
    cout << moves.size() << endl;
    for (auto i : moves) {
      cout << i + 1 << " ";
    }
  }
}
