#(#(#((##((()))(((#)(#()#(((()()(()#(##(((()(((()))#(((((()(((((((()#((#((()(#(((()(()##(()(((()((#(
 (#((((()
 (#((
 ((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((##
 (())((((#)
 (#(
 (#))(#(#)((((#(##((#(#((((#(##((((((#((()(()(())((()#((((#((()((((#(((((#(##)(##()((((()())(((((#(((
 ##((((((()
 #((#
 #))))
 (((((#(#(#(#()
 ((#(()#(##
 (((((((((((((((((((###################
 )((##((###
 (((()#(#)(
 ((#)(
 )(((())#
 ()((#((#(#()
 ((#(
 ()#(#())()()#)(#)()##)#((()#)((#)()#())((#((((((((#)()()(()()(((((#)#(#((((#((##()(##(((#(()(#((#))#

-1
 -1
 -1
 1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
 3
 -1
 -1
 -1
 -1
 -1
 1
1
1
5
 1
1
1
1
 1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
 -1
 -1
 -1
 -1
 1
1
3
 -1
 -1

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;

public class C {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);

        String x = br.readLine();
        int l = x.length();
        long count1[] = new long[l + 2], count2[] = new long[l + 2], c1 = 0, c2 = 0, add = 0, minDiff[] = new long[l + 2], increment[] = new long[l];
        boolean[] change = new boolean[l];

        for (int i = 1; i <= l; i++) {
            char e = x.charAt(i - 1);
            if (e == '(') {
                c1++;
                count1[i] = count1[i - 1] + 1;
                count2[i] = count2[i - 1];
            } else {
                c2++;
                count1[i] = count1[i - 1];
                count2[i] = count2[i - 1] + 1;

                if (e == '#')
                    change[i - 1] = true;
            }
        }
        count1[l + 1] = Integer.MAX_VALUE; count2[l + 1] = Integer.MIN_VALUE;

        Arrays.fill(minDiff, Integer.MAX_VALUE);
        for (int i = l + 1; i > 0; i--)
            minDiff[i - 1] = Math.min(count1[i] - count2[i], minDiff[i - 1]);

        long diff = c1 - c2;
        boolean flag = true;
        for (int i = 1; i <= l; i++) {
            if (count1[i] < (count2[i] + add)) {
                flag = false;
                break;
            } else if (change[i - 1] && count1[i] > (count2[i] + add) && diff > 0) {
                long min = Math.min(count1[i] - (count2[i] + add), minDiff[i] - add);
                if (min < 0) {
                    flag = false;
                    break;
                }
                min = Math.min(min, diff);

                add += min;
                diff -= min;
                increment[i - 1] = min;
            }
        }

        if (diff > 0)
            flag = false;

        if (flag) {
            for (int i = 0; i < l; i++)
                if (change[i])
                    out.println(increment[i] + 1);
        } else {
            out.println(-1);
        }
        out.close();
    }
}
