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

-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.util.*;
public class Main {

    public static void main(String[] args) {


        String inputString = null,finalString = "";
        int count = 0,step = 0,flag = 0;
        int countHash = 0,temp = 0;
        Scanner scanner = new Scanner(System.in);
        inputString = scanner.next();

        for(int i=0; i<inputString.length(); i++)
        {
            if(inputString.charAt(i) == '(')
            {
                ++count;
                step = 0;
                flag++;
            }
            else if(inputString.charAt(i) == '#')
            {
                if(count == 0)
                {
                    System.out.println("-1");
                    System.exit(0);
                }
                step = 1;
                if(i==0)
                {
                    System.out.println("-1");
                    System.exit(0);
                }
                if(step == 1)
                    flag = 0;
                ++countHash;
            }
            else if(inputString.charAt(i) == ')')
            {
                if(i==0)
                {
                    System.out.println("-1");
                    System.exit(0);
                }
                --count;
                if(step == 1)
                    flag = 0;
                else
                    flag--;
            }
        }
        if(flag > 0)
        {
            finalString = "-1";
        }

        else if(step == 1 || (step == 0 && flag == 0) || (step == 0 && flag < 0))
        {       
            if(count > 0)
            {
                while(countHash >1)
                {
                    temp = count - (count - 1); 
                    finalString = finalString + temp + "\n";
                    count--;
                    --countHash;
                }
            }
            finalString += count;
        }
        //        System.out.println("count: " + finalString);

        if(finalString.equals("0") || finalString.startsWith("-"))
            System.out.println("-1");
        else
            System.out.println(finalString);
        scanner.close();
    }

}