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

-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.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.StringTokenizer;


public class A {
	
	static class Scanner{
		BufferedReader br=null;
		StringTokenizer tk=null;
		public Scanner(){
			br=new BufferedReader(new InputStreamReader(System.in));
		}
		public String next() throws IOException{
			while(tk==null || !tk.hasMoreTokens())
				tk=new StringTokenizer(br.readLine());
			return tk.nextToken();
		}
		public int nextInt() throws NumberFormatException, IOException{
			return Integer.valueOf(next());
		}
		public long nextLong() throws NumberFormatException, IOException{
			return Long.valueOf(next());
		}
		public double nextDouble() throws NumberFormatException, IOException{
			return Double.valueOf(next());
		}
	}
	
	public static void main(String args[]) throws NumberFormatException, IOException{
		Scanner sc = new Scanner();
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		char[] s = sc.next().toCharArray();
		int last = -1;
		int abren = 0;
		int cierran = 0;
		int numerales = 0;
		for(int i = 0; i < s.length; i++){
			if (s[i] == '(')
				abren++;
			else if(s[i] == ')')
				cierran++;
			else{
				numerales++;
				last = i;
			}
		}
		for(int i = 0; i < s.length; i++){
			if (s[i] == '#' && i != last){
				s[i] = ')';
				cierran++;
			}
		}
		if (cierran >= abren){
			bw.write("-1\n");
			bw.flush();
			return;
		}
		int diff = abren - cierran;
		StringBuilder sb = new StringBuilder();
		for(int i = 0; i < s.length; i++){
			if (i == last){
				for(int j = 0; j < diff; j++)
					sb.append(')');
				continue;
			}
			if (s[i] != '#')
				sb.append(s[i]);
		}
		char[] t = sb.toString().toCharArray();
		if (test(t)){
			for(int i = 0; i < numerales - 1; i++)
				bw.write("1\n");
			bw.write(diff + "\n");
		}
		else
			bw.write("-1\n");
		bw.flush();
	}
	
	static boolean test(char[] t){
		int count = 0;
		for(int i = 0; i < t.length; i++){
			if (t[i] == ')')
				count--;
			else
				count++;
			if (count < 0)
				return false;
		}
		if (count != 0)
			return false;
		return true;
	}

}
