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

-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.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;


import java.util.StringTokenizer;



public final class CF_Treasure {

	void log(int[] X){
		int L=X.length;
		for (int i=0;i<L;i++){
			logWln(X[i]+" ");
		}
		log("");
	}


	void log(long[] X){
		int L=X.length;
		for (int i=0;i<L;i++){
			logWln(X[i]+" ");
		}
		log("");
	}
	void log(Object[] X){
		int L=X.length;
		for (int i=0;i<L;i++){
			logWln(X[i]+" ");
		}
		log("");
	}


	void log(Object o){
		logWln(o+"\n");
	}

	void logWln(Object o){
		//System.out.print(o);
		outputWln(o);

	}
	void info(Object o){
		System.out.println(o);
		//output(o);
	}

	void output(Object o){

		outputWln(""+o+"\n");

	}

	void outputWln(Object o){
		// System.out.print(o);

		try {
			out.write(""+ o);
		} catch (Exception e) {

		}
	}


	String next(){
		while (st== null|| !st.hasMoreTokens()) {
			try {
				st=new StringTokenizer(in.readLine());
			} catch (Exception e) {
			}
		}
		return st.nextToken();
	}

	String nextLine(){
		try {
			return in.readLine();
		} catch (Exception e) {
		}
		return null;
	}

	int nextInt(){
		return Integer.parseInt(next());
	}


	long nextLong(){
		return Long.parseLong(next());


	}

	// Global vars
	StringTokenizer st;
	BufferedReader in;
	BufferedWriter out;

	void solve(String S){
		int L=S.length();
		int[] op=new int[L];
		int[] cl=new int[L];
		int po=0,pc=0;

		int polast=-1;
		int pclast=-1;
		int lastpos=-1;
		int cnt=0;
		char c='.';
		for (int i=0;i<L;i++){
			c=S.charAt(i);
			if (c=='(')
				po++;
			if (c==')')
				pc++;
			if (c=='#') {
				cnt++;
				pc++;
				polast=po;
				pclast=pc;
				lastpos=i;
			}
			op[i]=po;
			cl[i]=pc;
			if (pc>po){
				output(-1);
				return;
			}
		}
		if (c=='(') {
			output(-1);
			return;	
		}
		if (lastpos==-1){
			if (po!=pc) {
				output(-1);
				return;
			}
		} else {
			int delta=po-pc;
			if (polast<pclast+delta){
				output(-1);
				return;
			}
			for (int i=0;i<cnt-1;i++)
				output(1);
			output((1+delta));
		}


	}

	void process() throws Exception {


		out = new BufferedWriter(new OutputStreamWriter(System.out));
		in=new BufferedReader(new InputStreamReader(System.in));

		String S=next();
		solve(S);

		try {
			out.close();
		}
		catch (Exception e){}


	}



	public static void main(String[] args) throws Exception {
		CF_Treasure J=new CF_Treasure();


		J.process();


	}


}