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

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


public class Main {
	public static void main(String[] args) throws IOException{
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		
		//InputStream inputStream = new FileInputStream("input.txt");
		//OutputStream outputStream = new FileOutputStream("output.txt");
		
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		
		TaskC solver = new TaskC();
		solver.solve(in, out);
		
		out.close();
	}
}

class TaskC {
    public void solve(InputReader in, OutputWriter out) {
    	
    	String s = in.nextLine();
    	ArrayList<Integer> ans = new ArrayList<Integer>();
    	
    	int cnt=0;
    	for(int i=0; i<s.length(); i++){
    		if(s.charAt(i)=='#'){
    			ans.add(i);
    		}
    		if(s.charAt(i)=='(') cnt++; else cnt--;
    	}
    	
    	int cnt1=0;
    	boolean flag=true;
    	for(int i=0; i<s.length(); i++){
    		if(s.charAt(i)=='(') 
    			cnt1++;
    		else if(s.charAt(i)==')')
    			cnt1--;
    		else if(i==ans.get(ans.size()-1))
    			cnt1-=cnt+1;
    		else
    			cnt1--;
    		
    		flag&=cnt1>=0;
    	}
    	
    	if(cnt1!=0 || cnt+1==0 || !flag)
    		out.write(-1);
    	else{
    		for(int i=0; i<ans.size()-1; i++)
    			out.writeln(1);
    		out.writeln(cnt+1);
    	}
    }
    
}


class InputReader{
	
	BufferedReader reader;
	StringTokenizer tokenizer;
	
	public InputReader(InputStream stream){
		tokenizer = null;
		reader = new BufferedReader(new InputStreamReader(stream));
	}
	
	public String next(){
		while(tokenizer==null || !tokenizer.hasMoreTokens()){
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException();
			}
		}
		
		return tokenizer.nextToken();
	}
	
	public String nextLine(){
		tokenizer = null;
		try {
			return reader.readLine();
		} catch (IOException e) {
			throw new RuntimeException();
		}
	}
	
	public int nextInt(){
		return Integer.parseInt(next());
	}
	
	public long nextLong(){
		return Long.parseLong(next());
	}
	
	public int[] nextIntArray(int n){
		int[] res = new int[n];
		for(int i=0; i<n; i++)
			res[i] = nextInt();
		
		return res;
	}
	
}

class OutputWriter{
	
	PrintWriter out;
	
	public OutputWriter(OutputStream stream){
		out = new PrintWriter(new BufferedWriter(
				new OutputStreamWriter(stream)));
	}
	
	public void write(Object ...o){
		for(Object cur : o)
			out.print(cur);
	}
	
	public void writeln(Object ...o){
		write(o);
		out.println();
	}
	
	public void flush(){
		out.flush();
	}
	
	public void close(){
		out.close();
	}
	
}
	
