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

-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.util.LinkedList;
import java.util.Scanner;

public class Main4 {

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String curr = br.readLine();
        int needed = 0;
        int hashes = 0;
        int o = 0;
        int c = 0;
        for (int i = 0; i < curr.length(); i++) {
            if (curr.charAt(i) == '(') {
                needed++;
                o++;
            } else if (curr.charAt(i) == ')') {
                c++;
                needed--;
            } else {
                hashes++;
            }
            
        }

        if (needed < hashes ) {
            System.out.println("-1");
        } else {

            int[] ans = new int[1000000];
            for (int i = 0; i < hashes; i++)
                ans[i]++;
            needed -= hashes;
             if (needed == 0) {
                for (int i = 0; i < hashes; i++)
                    System.out.println(ans[i]);
            } else {
                ans[hashes-1] += needed;
                
                
                int sum = 0;
                int index = 0;
                for(int i = 0;i<curr.length();i++)
                {
                    if(curr.charAt(i)=='(')
                        sum++;
                    else if(curr.charAt(i)=='#'){
                        sum+=ans[index++];
                    }else if(curr.charAt(i)==')'){
                        sum--;
                    }
                }
                
                if(sum==0){
                for (int i = 0; i < hashes; i++)
                    System.out.println(ans[i]);
                
                }else
                    System.out.println("-1");
            }
        }

    }

}
