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

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

public class parta {

    static String ans = "";
    public static void solver(String s){
        int lft = 0;
        int rt = 0;
        for (int i = 0; i < s.length(); i++)
        {
            if (s.charAt(i) == '(')
                lft++;
            else if (s.charAt(i) == ')')
                rt++;
            else
            {
                i++;
                while (i < s.length() && s.charAt(i) == ')' )
                {
                    i++;
                    rt++;
                }
                if (i < s.length() && s.charAt(i) == '#')
                {
                    if (lft > 0)
                    {
                        ans = ans+ "1";
                        lft--;
                    }
                    else
                        {ans = "-1";
                        return;}
                }
                else
                {
                    int dif = lft - rt;
                    if (dif == 0)
                    {
                        ans = "-1";
                        return;
                    }
                    else
                        ans += Integer.toString(dif);
                    lft = 0;
                    rt = 0;
                    
                }
                i--;
            }
        }
    }
    
    public static void main(String[] args) {
        /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
        int t;
        
        try{
        BufferedReader br = 
                      new BufferedReader(new InputStreamReader(System.in));
        String input;
        input=br.readLine();
        solver(input);
        if (Integer.parseInt(ans) == -1)
            System.out.println(-1);
        else
        {
            for (int i =0; i < ans.length();i++)
                System.out.println(ans.charAt(i));
        }
        
        }catch(IOException io){
          io.printStackTrace();
       }
    }
    
}
