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

-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.*;
import java.util.*;

public class Main {
    
    
    static InputReader in;
    static PrintWriter out;
        
    public static void main(String[] args) throws IOException{
        //InputStream ins = new FileInputStream("E:\\rush.txt");
        InputStream ins = System.in;
        in = new InputReader(ins);
        out = new PrintWriter(System.out);
        //code start from here
        new Task().solve(in, out);
        out.close();
    }
    
    static int N = (int)1e5;
    static class Task{
        String s;
        int a[] = new int[N+10],n;
        int cnt = 0;
        
        public void solve(InputReader in,PrintWriter out) {
        	s = in.next();
        	n = s.length();
        	int idx = 0;
        	for (int i = 0;i < n;i++) {
        		if (s.charAt(i)=='(') {
        			a[i+1] = 1;
        		}else if (s.charAt(i)==')') {
        			a[i+1] = -1;
        		}else {
        			cnt++;
        			idx = i+1;
        			a[i+1] = -1;
        		}
        	}
        	for (int i = 1;i <= n;i++) {
        		a[i]+=a[i-1];
        	}
        	for (int i = 1;i <= n;i++) {
        		if (a[i]<0) {
        			System.out.println(-1);
        			return;
        		}
        	}
        	int temp = a[n];
        	for (int i = idx;i <= n;i++) {
        		a[i]-=a[n];
        		if (a[i]<0) {
        			System.out.println(-1);
        			return;
        		}
        	}
        	for (int i = 1;i <= cnt-1;i++) {
        		out.println(1);
        	}
        	out.println(temp+1);
        }
    }

    

    static class InputReader{
        public BufferedReader br;
        public StringTokenizer tokenizer;
        
        public InputReader(InputStream ins) {
            br = new BufferedReader(new InputStreamReader(ins));
            tokenizer = null;
        }
        
        public String next(){
            while (tokenizer==null || !tokenizer.hasMoreTokens()) {
                try {
                tokenizer = new StringTokenizer(br.readLine());
                }catch(IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        
        public int nextInt() {
            return Integer.parseInt(next());
        }
    }
}