func_code_string: #include <bits/stdc++.h>   using namespace std;   typedef long long ll;   typedef __int128_t LL;   typedef long double ld;   typedef pair<int, int> pii;   typedef pair<ll, ll> pll;   #define F first   #define S second   #define pb push_back   mt19937 rnd;      const int N = 1e5 + 10;   bool good[N], ban[N];      vector<int> get(const vector<int>& a) {       vector<int> res;       for (int i = 1; i < a.size(); i++) {           res.pb(a[i] - a[i - 1] - 1);       }       return res;   }      bool solve0(int n) {       for (int i = 1; i <= n; i++) {           if (!good[i]) {               return 0;           }       }       return 1;   }      vector<int> solve1(int n) {       if (good[1] || good[n]) {           return {};       }       for (int i = 1; i <= n - 1; i++) {           if (good[i] && good[i + 1]) {               return {};           }       }       vector<int> res;       for (int i = 1, cnt = 0; i <= n; i++) {           if (!good[i]) {               cnt++;               if (i == n || good[i + 1]) {                   res.pb(cnt);                   cnt = 0;               }           }       }       return res;   }      vector<int> solve2(int n) {       if (!good[1] || !good[n]) {           return {};       }       vector<int> a = {0};       for (int i = 1, cnt = 0; i <= n; i++) {           if (good[i]) {               cnt++;               if (i == n || !good[i + 1]) {                   if (i == cnt) {                       if (!(cnt & 1)) {                           return {};                       }                       else {                           for (int j = 2; j <= i; j += 2) {                               a.pb(j);                           }                       }                   }                   else if (i == n) {                       if (!(cnt & 1)) {                           return {};                       }                       else {                           for (int j = i - cnt + 1; j <= i; j += 2) {                               a.pb(j);                           }                       }                   }                   else {                       if (cnt & 1) {                           return {};                       }                       else {                           for (int j = i - cnt + 1; j <= i; j += 2) {                               a.pb(j);                           }                       }                   }                   cnt = 0;               }           }       }       return get(a);   }      vector<int> solve3(int n) {       vector<int> kek;       for (int i = 1; i <= n; i++) {           if (!good[i]) {               ban[i] = 1;               kek.pb(i);           }       }       for (int j = 1; j <= kek.back(); j++) {           ban[j] = 1;       }       for (int j = 1; j <= n + 2 - kek.front() - 1; j++) {           ban[j] = 1;       }       ban[n - kek.front() + 3] = 1;       for (int i = 1; i <= n - 1; i++) {           if (!good[i] && good[i + 1]) {               ban[i + 2] = 1;           }       }       for (int i = 0; i + 1 < kek.size(); i++) {           ban[n + kek[i] - kek[i + 1] + 4] = 1;       }       for (int s = n - 1; s >= 2; s--) {           if (!ban[s]) {               vector<int> a = {0};               for (int i = 1, cnt = 0; i <= n; i++) {                   if (good[i]) {                       cnt++;                       if (i == n) {                           int l = i - cnt + 1;                           int r = s;                           if (l <= r) {                               for (int j = l; j <= r; j += 2) {                                   a.pb(j);                               }                               a.back() = r;                           }                           cnt = 0;                       }                       else if (!good[i + 1]) {                           int l = i - cnt + 1;                           int r = i + 1 - (n + 2 - s);                           if (i == cnt) {                               l = 2;                           }                           if (l <= r) {                               for (int j = l; j <= r; j += 2) {                                   a.pb(j);                               }                               a.back() = r;                           }                           cnt = 0;                       }                   }               }               return get(a);           }       }       return {};   }      vector<int> solve(int n) {       if (n == 1) {           if (good[1]) {               return {};           }           else {               return {1};           }       }       if (solve0(n)) {           return {};       }       vector<int> ans = solve1(n);       if (!ans.empty()) return ans;       ans = solve2(n);       if (!ans.empty()) return ans;       ans = solve3(n);       if (!ans.empty()) return ans;       return {-1};   }      int main() {       ios_base::sync_with_stdio(0); cin.tie(0);   #ifdef LOCAL       freopen( input.txt ,  r , stdin);   #endif          string s;       cin >> s;       int n = s.size();       for (int i = 1; i <= n; i++) {           good[i] = (s[i - 1] ==  _ );       }       vector<int> ans = solve(n);       if (!ans.empty() && ans.front() == -1) {           cout <<  -1 n ;       }       else {           cout << ans.size() <<   n ;           for (int i : ans) {               cout << i <<    ;           }           cout <<   n ;       }      #ifdef LOCAL       cerr <<   nTime elapsed:   << 1.0 * clock() / CLOCKS_PER_SEC <<   s. n ;   #endif       return 0;   }   