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

-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

    /*
     * Code Author: Akshay Miterani
     * DA-IICT
     */
    import java.io.*;
import java.math.*;
import java.util.*;
     
     
    public class MainZ {
     
    	static double eps=(double)1e-6;
    	static final int mod = (int) 1e9 + 7;

    	public static void main(String args[]){
    		InputReader in = new InputReader(System.in);
    		OutputStream outputStream = System.out;
    		PrintWriter out = new PrintWriter(outputStream);
    		//----------My Code Starts Here----------
    		String s=in.nextLine();
    		int n=s.length();
    		int count=0;
    		for(int i=0;i<n;i++){
    			if(s.charAt(i)=='(')
    				count++;
    			else if(s.charAt(i)==')')
    				count--;
    		}
    		int ind=-1,tmp=0,tmp1=0;
    		for(int i=0;i<n;i++){
    			if(s.charAt(i)=='#')
    				break;
    			else if(s.charAt(i)==')')
    				tmp1++;
    			else
    				tmp1--;
    			if(tmp1>0){
    				System.out.println("-1");
        			return;
    			}
    		}
    		for(int i=n-1;i>=0;i--){
    			if(s.charAt(i)=='#'){
    				ind=i;
    				break;
    			}
    			else if(s.charAt(i)==')')
    				tmp++;
    			else
    				tmp--;
    			if(tmp<0){
    				System.out.println("-1");
        			return;
    			}
    		}
    		if(tmp<0 ||  count<=0 || tmp1>=0){
    			System.out.println("-1");
    			return;
    		}
    		int ctr=0;
    		int has=0;
    		for(int i=0;i<n;i++){
    			if(s.charAt(i)=='#')
    				has++;
    		}
    		if(count-has-1<=0){
    			System.out.println("-1");
    			return;
    		}
    		for(int i=0;i<n;i++){
    			if(i==ind)
    				System.out.println(count-ctr);
    			else if(s.charAt(i)=='#'){
    				System.out.println("1");
    				ctr++;
    			}
    		}
    		out.close();
    		//---------------The End------------------
    	}
    	
    	static class InputReader {
    	    public BufferedReader reader;
    	    public StringTokenizer tokenizer;
     
    	    public InputReader(InputStream inputstream) {
    	      reader = new BufferedReader(new InputStreamReader(inputstream));
    	      tokenizer = null;
    	    }
    	    
    	    public String nextLine(){
    	    	String fullLine=null;
    	    	while (tokenizer == null || !tokenizer.hasMoreTokens()) {
    	            try {
    	              fullLine=reader.readLine();
    	            } catch (IOException e) {
    	              throw new RuntimeException(e);
    	            }
    	            return fullLine;
    	          }
    	          return fullLine;
    	    }
    		public String next() {
    	      while (tokenizer == null || !tokenizer.hasMoreTokens()) {
    	        try {
    	          tokenizer = new StringTokenizer(reader.readLine());
    	        } catch (IOException e) {
    	          throw new RuntimeException(e);
    	        }
    	      }
    	      return tokenizer.nextToken();
    	    }
    		public long nextLong() {
    		      return Long.parseLong(next());
    		    }
    	    public int nextInt() {
    	      return Integer.parseInt(next());
    	    }
    	  }
    } 