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

-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.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;

public class Test {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        String input = br.readLine();

        int leftCount = 0;
        int rightCount = 0;
        int hc = 0;

        int finalHash = -1;
        for (int i = 0; i < input.length(); ++i) {
            char c = input.charAt(i);
            if (c == '(') {
                leftCount++;
            } else if (c == ')') {
                rightCount++;
            } else if (c == '#') {
                finalHash = i;
                rightCount++;
                hc++;
            }
            if (rightCount > leftCount) {
                bw.write("-1\n");
                bw.flush();
                System.exit(0);
            }
        }
        
        int checkc = 0;
        for (int i = 0; i < input.length(); ++i) {
            char c = input.charAt(i);
            if (c == '(') {
                checkc++;
            } else if (c == ')') {
                checkc--;
            } else {
                if (c == '#' && i != finalHash) {
                    checkc--;
                } else {
                    checkc -= (1 + leftCount - rightCount);
                }
            }
            if (checkc < 0) {
                bw.write("-1\n");
                bw.flush();
                System.exit(0);
            }
        }
        
        if (checkc != 0) {
            bw.write("-1\n");
            bw.flush();
            System.exit(0); 
        }
        
        
        
//        System.out.println(leftCount + " and " + rightCount);
        for (int i = 1; i <= hc; ++i) {
            if (i < hc) {
                bw.write("1\n");
            } else {
                bw.write(1 + (leftCount - rightCount) + "\n");
            }
        }
        
        

        bw.flush();
        bw.close();
    }
}
