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

-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.util.Scanner;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author mongsiry013
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskA solver = new TaskA();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskA {
    String S;
    int cntA, cntC;
    int answer[], index=0;
    public void solve(int testNumber, Scanner in, PrintWriter out) {
        S = in.next();
        cntA = cntC =0;
        for(int i=0; i<S.length(); ++i) {
            char c = S.charAt(i);
            if (c == '#') {
                cntC++;
            }
        }
        answer = new int[cntC];
        for(int i=0; i<S.length(); ++i){
            char c = S.charAt(i);
            if(c == '('){
                cntA++;
            }
            else if(c == ')'){
                cntA--;
                if(cntA <0){
                    out.println(-1);
                    return;
                }
            }
            else if(c == '#'){
                cntA--;
                cntC--;
                if(cntA < 0){
                    out.println(-1);
                    return;
                }
                if(cntC > 0){
                    answer[index++] = 1;
                }
                else{
                    answer[index++] = cntA+1;
                }
            }
        }

        for(int i=0; i<index; ++i){
            out.println(answer[i]);
        }
    }
}

