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

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

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

class TaskA {
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int fillNr = 0;
        int lastIndex = -1;
        int val = 0;

        String s = in.nextLine();

        for (int i=0; i<s.length(); i++){
            if (s.charAt(i) == '('){
                val++;
            } else if (s.charAt(i) == ')'){
                val--;
            } else {
                fillNr++;
                lastIndex = i;
            }
        }

        val -= fillNr;

        if (val <= 0){
            out.println(-1);
            return;
        }

        s = s.substring(0, lastIndex) + generate(val) + s.substring(lastIndex, s.length());
        s = s.replaceAll("#", ")");

        if (isValid(s)){
            printSol(fillNr, val, out);
        } else {
            out.println(-1);
        }
    }

    private void printSol(int fillNr, int val, PrintWriter out) {
        for (int i=0; i<fillNr-1; i++){
            out.println(1);
        }

        out.println(val+1);
    }

    private boolean isValid(String s) {
        int nr = 0;

        for (int i=0; i<s.length(); i++){
            if (s.charAt(i) == '('){
                nr++;
            } else{
                nr--;
            }

            if (nr < 0){
                return false;
            }
        }

        return nr == 0;
    }

    private String generate(int val) {
        StringBuilder builder = new StringBuilder();

        for (int i=0; i<val; i++){
            builder.append(")");
        }

        return builder.toString();
    }
}

class InputReader {
    public BufferedReader reader;


    public InputReader(InputStream stream){
        reader = new BufferedReader(new InputStreamReader(stream));
    }

    public String nextLine(){
		try{
			return reader.readLine();
		} catch(IOException e){
			throw new RuntimeException("ERROR", e);
		}
	}

}

