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

-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.Point;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.Stack;
import java.util.StringTokenizer;
 
 
 
 
 
public class TestClass {
 
static long[] dis ;	
static int[] vis;
static ArrayList<Integer>[] resu;
static int[] som;
static long max;
static long max2;
static int[][] dp;
 
public static void update(int[] som , int i, int value){
 
while(i<=100000){
 
som[i]+=value;
i+=(i & -i);
}
}
 
public static int value(int[] som , int i){
int ans =0;
 
while(i>0)
{
ans+=som[i];
i-=( i & -i);
 
}
return ans;
 
 
}
 
 
public static void main(String args[] ) throws IOException {
 
 
// BufferedReader in = new BufferedReader(new FileReader("C:\\Users\\Sompathak\\Desktop\\yes.txt"));
// Scanner in = new Scanner(new FileReader("C:\\Users\\Sompathak\\Desktop\\yes.txt"));
// PrintWriter pw = new PrintWriter(new FileWriter("C:\\Users\\Sompathak\\Desktop\\output.txt"));
 
Scanner in = new Scanner(new InputStreamReader(System.in));
//Scanner in = new Scanner(new FileReader("C:\\Users\\Sompathak\\Desktop\\yes.txt"));
String s =in.next();
int total=0;
int index=0;
for(int i=0;i<s.length();i++) {
	if(s.charAt(i)=='(' ) total++;
	else if(s.charAt(i)== ')') total--;
	
	if(s.charAt(i)== '#' ) index =i;
}

int[] ss = new int[s.length()];
int k=0;
boolean fin = false;
boolean sss= false;
boolean az = false;
if(total<=0) System.out.println("-1");
else{
	int temp=0;
	for(int i=0;i<s.length();i++){
	    if(total<=0){
	  
	    	sss= true;
	    	break;
	    }
	   
		if(s.charAt(i)== '(') temp++;
		else if(s.charAt(i)== ')') temp--;
		else{
			 
			 if(temp>0 && i!=index){
				 temp--;
				 total--;
				 ss[k++] =1;
			 }
			 else if(i==index && temp>0){
				  ss[k] = total;
				  index =i;
				  fin = true;
				  break;
				  
			 }else{
				 
					  
				    	sss= true;
				    	break;
				    			 }
			 
		}
	}
	if(!sss){
		sss = false; fin = true;
		for(int i=index+1;i<s.length();i++){
			if(s.charAt(i)== ')')  {
				
				sss = true;}
				 
			if(	s.charAt(i)== '(') {
				
				fin =false;}
		}
		if(sss && !fin)
			System.out.println("-1");
		else
			for(int i=0;i<=k;i++) System.out.println(ss[i]);
	}
	else System.out.println("-1");
}

 

}
}
 