func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 1e5 + 5;   string s;   int a[maxn], tot, n;   int main() {     while (cin >> n) {       memset(a, 0, sizeof a);       tot = 0;       cin >> s;       string temp = s;       if (n == 1) {         puts( 0 );         continue;       }       for (int i = n - 1; i >= 1; i--) {         if (s[i] ==  B )           s[i] =  W , s[i - 1] = (s[i - 1] ==  B  ?  W  :  B ), a[++tot] = i - 1;       }       if (s[0] ==  B ) {         tot = 0;         s = temp;         for (int i = n - 1; i >= 1; i--) {           if (s[i] ==  W )             s[i] =  B , s[i - 1] = (s[i - 1] ==  B  ?  W  :  B ),             a[++tot] = i - 1;         }         if (s[0] ==  W )           puts( -1 );         else {           cout << tot << endl;           for (int i = 1; i <= tot; i++) cout << a[i] + 1 <<    ;           cout << endl;         }       } else {         cout << tot << endl;         for (int i = 1; i <= tot; i++) cout << a[i] + 1 <<    ;         cout << endl;       }     }   }   