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

-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.awt.*;
import java.awt.geom.Area;
import java.io.*; 
import java.math.*;
import java.util.*;
import java.util.Map.Entry;

import javax.management.RuntimeErrorException;

import static java.lang.Math.*; 
   
public class Solution implements Runnable { 
        final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null; 
        BufferedReader in; 
        PrintWriter out; 
        StringTokenizer tok = new StringTokenizer(""); 
        String delim = " ";
          
        String readString() throws IOException { 
        	try {
	    		while(!tok.hasMoreTokens()) {
	    			tok = new StringTokenizer(in.readLine()); 
		        }
		        return tok.nextToken(delim);
	    	}
        	catch (Exception e){
        		return null;
	    	}
        }
         
        int readInt() throws IOException{ 
            return Integer.parseInt(readString()); 
        }   
        long readLong() throws IOException{ 
            return Long.parseLong(readString()); 
        }       
        double readDouble() throws IOException{ 
            return Double.parseDouble(readString()); 
        }        
        Point readPoint() throws IOException {
        	return new Point(readInt(), readInt());
        }
        
        char readChar() throws IOException{
        	int x = 0;
        	while ((x = in.read()) == '\n' || x == '\r' || x == ' '){ }
        	return (char)x;
        }
        
//----------------------------------   
        public class Pair<T1,T2> { 
            public T1 x1; 
            public T2 x2; 
            public Pair(){}
            public Pair(T1 x1, T2 x2){ 
                this.x1 = x1; 
                this.x2 = x2; 
            } 
            public String toString(){ 
                return x1 + ":" + x2; 
            } 
        }  
        
        public class Three implements Comparable<Three> { 
            public int x; int y, z; 
            public Three(){} 
            public Three(int a, int b, int c){x = a;y=b;z=c;} 
            public String toString(){ 
                return x + ":" + y + ":" + z; 
            }
			@Override
			public int compareTo(Three arg0) {
				return x - arg0.x;
			} 
        }
//---------------------------------------- 
        
        void solve() throws NumberFormatException, IOException { 
        	
        	char[] a = readString().toCharArray();
        	int n = a.length;
        	int[] l = new int[n];
        	int[] r = new int[n];
        	
        	int[] ans = new int[n];
        	int last = -1;
        	
        	for (int i = 0; i < n; i++){
        		if (i > 0) {
        			l[i] = l[i-1];
        			r[i] = r[i-1];
        		}
        		if (a[i] == '('){
        			l[i]++;
        		}
        		if (a[i] == ')'){
        			r[i]++;
        		}
        		if (a[i] == '#'){
        			ans[i] = 1;
        			last = i;
        			r[i]++;
        		}
        		
        		if (r[i] > l[i]){
        			out.println(-1);
        			return;
        		}
        	}
        	
        	int z = l[n-1] - r[n-1];
        	if (last != -1){
        		ans[last] += z;
        	}
        	
        	l = new int[n];
        	r = new int[n];
        	
        	ArrayList<Integer> aa = new ArrayList<Integer>();
        	
        	for (int i = 0; i < n; i++){
        		if (i > 0) {
        			l[i] = l[i-1];
        			r[i] = r[i-1];
        		}
        		if (a[i] == '('){
        			l[i]++;
        		}
        		if (a[i] == ')'){
        			r[i]++;
        		}
        		if (a[i] == '#'){
        			aa.add(ans[i]);
        			r[i]+=ans[i];
        		}
        		
        		if (r[i] > l[i]){
        			out.println(-1);
        			return;
        		}
        	}
        	
        	for (int x : aa){
        		out.println(x);
        	}
        	
        }
//---------------------------------------- 
        public static void main(String[] args){ 
            new Thread(null, new Solution(), "", 256 * (1L << 20)).start(); 
        } 
         
        public void run(){ 
                try{ 
                        timeBegin = System.currentTimeMillis(); 
                        
                        try{ 
                            if (ONLINE_JUDGE){ 
                                in = new BufferedReader(new InputStreamReader(System.in)); 
                                out = new PrintWriter(System.out);
                            }  
                            else {                         
                            	in = new BufferedReader(new FileReader("input.txt")); 
                            	out = new PrintWriter("output.txt");                                 
                            } 
                        }catch(Throwable e){
                            in = new BufferedReader(new InputStreamReader(System.in)); 
                            out = new PrintWriter(System.out); 
                        }
                          
                        solve(); 
                        out.close(); 
                          
                        timeEnd = System.currentTimeMillis(); 
                        System.err.println("Time = " + (timeEnd - timeBegin)); 
                }catch (Exception e){ 
                        e.printStackTrace(System.err); 
                        System.exit(-1); 
                } 
        } 
         
        long timeBegin, timeEnd; 
}