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

-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,cntB, cntC;
    int last=-1, cntOne=0;
    public void solve(int testNumber, Scanner in, PrintWriter out) {
        S = in.next();
        if(S.equals("#")){
            out.println(-1);
            return;
        }
        int N = S.length();
        cntA = cntB = cntC = 0;
        for(int i=0; i<N; ++i){
            char c = S.charAt(i);
            if(c == '(') cntA++;
            else if(c == ')') cntB++;
            else{
                cntC++;
                last = i;
            }
        }

        int stack1 = 0;
        for(int i=0; i<last; ++i){
            char c = S.charAt(i);
            if(c == '(') stack1++;
            else stack1--;
            if(stack1 <0){
                out.println(-1);
                return;
            }
            if(c == '#') cntOne++;
        }

        int stack2 = 0;
        for(int i=last+1; i<N; ++i){
            char c = S.charAt(i);
            if(c=='(') stack2++;
            else stack2--;
            if(stack1-1+stack2 <0){
                out.println(-1);
                return;
            }
        }
        if(stack2 > 0){
            out.println(-1);
            return;
        }
        for(int i=0; i<cntOne; ++i) out.println(1);
        if(stack1+stack2 > 0) out.println(stack1+stack2);
    }
}

