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

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

public class IHopeRichardBellmanBurnsInHell {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String string=br.readLine();
        int length=string.length();
        
        int numberLeft=0,numberRight=0,credits=0,flag=1;
        
        for(int i=0;i<length;i++)
        {
            if(string.charAt(i)=='(')
                numberLeft++;
            
            if(string.charAt(i)==')')
                numberRight++;
            
            if(string.charAt(i)=='#')
                credits++;
        }
        
        int[] howManyBrackets=new int[credits];
        int currentLeft=0,currentRight=0,creditIndex=0;
        
        if(numberLeft<=numberRight)
        {
            flag=0;
        }
        else
        {
            int missing=numberLeft-numberRight;
            
            for(int i=0;i<length;i++)
            {
                if(string.charAt(i)=='(')
                    currentLeft++;
                if(string.charAt(i)==')')
                    currentRight++;
                
                if(string.charAt(i)=='#')
                {
                    credits--;
                    if(currentRight==currentLeft)
                    {
                        flag=0;
                        break;
                    }
                    else
                    {
                        
                        if(credits==0)
                        {
                            howManyBrackets[creditIndex]=missing;
                            currentRight+=missing;
                        }
                        else
                        {
                            howManyBrackets[creditIndex]=1;
                            creditIndex++;
                            currentRight++;
                            missing--;
                        }
                    }
                    
                }
                
                if(currentRight>currentLeft)
                {
                    flag=0;
                    break;
                }
            }
        }
        
        if(currentRight!=currentLeft)
            flag=0;
        
        if(flag==0)
            System.out.print("-1");
        else
        {
            int infoLength=howManyBrackets.length;
            for(int i=0;i<infoLength;i++)
                System.out.println(howManyBrackets[i]);
        }
        
        
    }
    
}
