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

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

/**
 * 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 {

    boolean check (String s) {
        Stack<Character> st = new Stack<Character>();
        for(Character c : s.toCharArray()) {
            if(c == '(')
                st.add(c);
            else {
                if (st.isEmpty())
                    return false;
                st.pop();
            }
        }
        return st.empty();
    }
    public void solve(int testNumber, InputReader in, PrintWriter out) {
        String s = in.nextLine();
        int lIdx = s.lastIndexOf('#');
        int cto = 0;
        int ctc = 0;
        int ctp = 0;
        for (Character c: s.toCharArray()) {
            if(c == '(')
                ++cto;
            if(c == ')')
                ++ctc;
            if(c == '#')
                ++ctp;
        }

        int ctn = cto - ctc - ctp;
        if(ctn<0) {
            out.println(-1);
            return;
        }
        StringBuilder sb = new StringBuilder();
        for(int i=0;i<s.length();i++) {
            if(s.charAt(i) == '#') {
                sb.append(')');
                if(i == lIdx) {
                    for(int j=0;j<ctn;j++) {
                        sb.append(')');
                    }
                }
            } else {
                sb.append(s.charAt(i));
            }
        }

        if(check(sb.toString())) {
            for(int i=0;i<ctp;i++) {
                if(i!=ctp-1)
                    out.println(1);
                else
                    out.println(1+ctn);

            }
        }



    }
}

class InputReader {

    private InputStream stream;
    int curCharIndex = 0;
    int charsInBuf = 0;
     byte buf[] = new byte[16*1024];

    public InputReader(InputStream stream) {
        this.stream = stream;
    }


    public int readChar() {

        if (curCharIndex >= charsInBuf) {
            curCharIndex = 0;
            try {
                charsInBuf = stream.read(buf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (charsInBuf <= 0)
                return -1;
        }
        return buf[curCharIndex++];
    }


    public String nextLine() {
        StringBuilder buf = new StringBuilder();
        int c = readChar();
        while (c != '\n' && c != -1) {
            if (c != '\r')
                buf.appendCodePoint(c);
                c = readChar();
        }
        return buf.toString();
    }


    /*
    * For the purpose of compatibilty with Chelper Chrome extension
     */


}

