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

-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;

public class Treasure {

	public static void main(String[] args) throws IOException {
		 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	     String pattern = br.readLine();
	     Integer totalClosingBracesRequired = getTotalClosingBracesRequired(pattern);
	     if(totalClosingBracesRequired<=0)
	    	 System.out.println("-1");
	     else{
	    	 printTheClosingBracecsRequiredPerHash(pattern,totalClosingBracesRequired);
	     }
	}

	private static void printTheClosingBracecsRequiredPerHash(String pattern, Integer totalClosingBracesRequired) {

		int count=0;
		for(int i=0;i<pattern.lastIndexOf('#');i++){
			if(pattern.charAt(i)=='#'){
				System.out.println(1);
				count++;
			}
		}
		System.out.println(totalClosingBracesRequired-count);
	}

	private static Integer getTotalClosingBracesRequired(String pattern) {
		int count=0;
		for(int i=0;i<pattern.length();i++){
			if(pattern.charAt(i)=='('){
				count++;
			}else if(pattern.charAt(i)==')'){
				count--;
			}if(pattern.charAt(i)=='#' && count<=0){
				return -1;
			}
		}
		boolean someFlag=true;
		for(int i=pattern.length()-1,count2=0;i>=0;i--){
			if(pattern.charAt(i)==')'){
				count2++;
			}else if(pattern.charAt(i)=='('){
				count2--;
			}
			if(count2<0)someFlag=false;
			if(pattern.charAt(i)=='#')break;

		}
		if(!someFlag) return -1;
		return count>=0?count:-1;
	}

}
