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

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

public class treasure {
	public static void solve(FS in, PrintWriter out) {
		String s = in.next();
		
		int left = 0;
		int hashCount = 0;
		boolean pos = true;
		for(int i=0; i<s.length(); i++){
			if(s.charAt(i) == '(') left++;
			if(s.charAt(i) == ')') left--;
			if(s.charAt(i) == '#'){
				left--;
				hashCount++;
			}
			
			if(left < 0) pos = false;
		}
		
		left = 0;
		for(int i=s.length()-1; i>=0; i--){
			if(s.charAt(i) == '#') break;
			if(s.charAt(i) == '(') left++;
			if(s.charAt(i) == ')') left--;
			if(left > 0) pos = false;
		}
		
		if(left > 0) pos = false;
		
		if(!pos){
			out.println(-1);
			return;
		}
		
		int seen = 0;
		left = 0;
		for(int i=0; i<s.length(); i++){
			if(s.charAt(i) == '(') left++;
			if(s.charAt(i) == ')') left--;
			if(s.charAt(i) == '#'){
				seen++;
				
				if(seen == hashCount){
					for(int j=i+1; j<s.length(); j++){
						if(s.charAt(j) == '(') left++;
						if(s.charAt(j) == ')') left--;
					}
					out.println(left);
				}
				
				else{
					out.println(1);
					left--;
				}
			}
		}
	}

	public static void main(String[] args) {
		PrintWriter out = new PrintWriter(System.out);
		solve(new FS(), out);
		out.flush();
		out.close();
	}

	static class FS {
		BufferedReader br;
		StringTokenizer st;

		public FS() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}
}
