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

-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 index=0;
int total=0;
int[] ans = new int[s.length()];
int j=0;
int k=0;
boolean fin = false;
for(int i=0;i<s.length();i++){
	if(s.charAt(i)=='#') index =i;
	else if(s.charAt(i)=='(') total++;
	else k++;
}
k=total-k;

if(k<=0) System.out.println("-1");
else{
	int temp=0;
	int xx =0;
	for(int i=0;i<s.length();i++){
		
		
		if(s.charAt(i)=='(') temp++;
		else if(s.charAt(i)==')') {xx++;}
		else{
			if(i!=index)
			{
			    ans[j++] =1;
			    k--;
			    xx++;
			}else{
				//System.out.println(xx+" "+k+" "+temp);
				ans[j] =k;
				xx+=k;
			}
			
			   
		}
		
		if(temp<xx) {fin = true; break;}
	}
	
	if(!fin)
	for(int i=0;i<=j;i++) System.out.println(ans[i]);
	else System.out.println("-1");
}
 

}
}
 