Problem: Joseph really likes the culture of Japan. Last year he learned Japanese traditional clothes and visual arts and now he is trying to find out the secret of the Japanese game called Nonogram.

In the one-dimensional version of the game, there is a row of n empty cells, some of which are to be filled with a pen. There is a description of a solution called a profile — a sequence of positive integers denoting the lengths of consecutive sets of filled cells. For example, the profile of [4, 3, 1] means that there are sets of four, three, and one filled cell, in that order, with at least one empty cell between successive sets.

<image>

A suitable solution for n = 12 and p = [4, 3, 1]. 

<image>

A wrong solution: the first four filled cells should be consecutive. 

<image>

A wrong solution: there should be at least one empty cell before the last filled cell. 

Joseph found out that for some numbers n and profiles p there are lots of ways to fill the cells to satisfy the profile. Now he is in the process of solving a nonogram consisting of n cells and a profile p. He has already created a mask of p — he has filled all the cells that must be filled in every solution of the nonogram.

<image>

The mask for n = 12 and p = [4, 3, 1]: all the filled cells above are filled in every solution. 

After a break, he lost the source profile p. He only has n and the mask m. Help Joseph find any profile p' with the mask m or say that there is no such profile and Joseph has made a mistake.

Input

The only line contains a string m — the mask of the source profile p. The length of m is n (1 ≤ n ≤ 100 000). The string m consists of symbols # and _ — denoting filled and empty cells respectively.

Output

If there is no profile with the mask m, output the number -1. Otherwise, on the first line, output an integer k — the number of integers in the profile p'. On the second line, output k integers of the profile p'.

Examples

Input


__#_____


Output


2
3 2 


Input


_#


Output


-1


Input


___


Output


0

Solution (in CPP):

Solution:
#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;
}