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

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

/**
 * Created by Faridy on 5/29/2017.
 */
public class Main {

    public static String st;
    public static int OpN = 0;
    public static int next = -1;

    public static int size;

    public static int[] answers;
    public static int answerI = 0;


    public static void main(String[] args) {


        Scanner sc = new Scanner(System.in);

        st = sc.nextLine();
        size = st.length();

        answers = new int[size];

        char token ;


        for (int i = 0; i <size ; i++) {

            token = st.charAt(i);

            switch (token){

                case '#' : next = hashtag(i);

                    if(next == -2) { //there is no next
                        print_answers();
                        return;
                    }

                    else {

                        i = next -1;
                    }

                    break;
                case ')' : OpN--;break;
                case '(' : OpN++;break;

            }//switch

        }//forI

        print_answers();

    }//main

    public static int hashtag(int i) {

        char token;

        if(i==size-1){
            add_answer(OpN);
            OpN = 0;
            return -2;
        }

        for (int j = i+1; j <size ; j++) {

            token = st.charAt(j);

            switch (token){

                case '#' :
                    add_answer(OpN);
                    OpN = 0;
                    return j;

                case ')' :
                    OpN--;
                    break;

                case '(' :
                    add_answer(OpN);
                    OpN = 0;
                    return j;

            }//switch

        }//forJ

        add_answer(OpN);
        OpN = 0;
        return -2; //could'nt find any next
    }



    public static void add_answer(int x){

        answers[answerI] = x;
        answerI++;

    }

    public static void print_answers(){


        if(check_answers())
            for (int i = 0; i <answerI ; i++) {
                System.out.println(answers[i]);
            }
        else
            System.out.println("-1");

    }

    public static boolean check_answers(){
        int x;

        if(answers[0]<=0)
            return false;
        for (int i = 1; i <answerI ; i++) {
            if(answers[i]<=0){
                x = answers[i-1];
                answers[i] += x-1;
                answers[i-1] = 1;
                if (answers[i]<=0)
                    return false;
            }
            else{
                x = answers[i-1];
                answers[i] += x-1;
                answers[i-1] = 1;
            }
        }
        return true;
    }

}//Main

  				 					  		  	 	  			   		