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

-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.PrintStream;
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 cnt=0,N,last, ans = 0;
    char A[];
    public void solve(int testNumber, Scanner in, PrintWriter out) {
        S = in.next();
        N = S.length();
        A = new char[2*N];
        for(int i=0; i<N; ++i){
            if(S.charAt(i) == '#'){
                cnt++;
                last = i;
            }
        }

        int stack = 0, plus = 0;
        for(int i=0; i<N; ++i){
            if(S.charAt(i) == '(') {
                stack++;
            }
            else {
                stack--;
            }
            A[i+plus] = S.charAt(i);
            if(i == last){
                if(stack < 0){
                    out.println(-1);
                    return;
                }
                for(int j=0; j<stack; ++j) A[i+j] = ')';
                plus = Math.max(1, stack-1);
                ans = stack;
            }
        }
        int stack2 = 0;
        for(int i=0; i<A.length; ++i){
            if(A[i] == '(') stack2++;
            else if(A[i] == ')' || A[i] == '#')stack2--;
            if(stack2 <0) {
                out.println(-1);
                return;
            }
        }
        if(stack2 != 0){
            out.println(-1);
            return;
        }

        for(int i=0; i<A.length; ++i){
            System.out.print(A[i]);
        }
        for(int i=0; i<cnt-1; ++i) out.println(1);
        out.println(ans);
    }
}

