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

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

/**
 * Created by birukoudzmitry on 24.05.18.
 */
public class A282 {

    public static void main(String[] args) {

        MyScanner in = new MyScanner();
        String s = in.next();

        int cnt = 0;
        for(int i=0;i<s.length();++i){
            if(s.charAt(i)=='#'){
                cnt++;
            }
        }

        int targetBalance = 0;
        for(int i=s.lastIndexOf('#')+1;i<s.length();++i){
            if(s.charAt(i)=='('){
                targetBalance++;
            }else{
                targetBalance--;
            }
        }

        if(targetBalance>0){
            System.out.println(-1);
            return;
        }


        int[] result = new int[cnt];

        int opened = 0;
        int index = 0;

        for(int i=0;i<=s.lastIndexOf('#');++i){
            if(s.charAt(i) == '('){
                opened++;
            }else if(s.charAt(i)==')'){
                opened--;
                if(opened<0){
                    System.out.println(-1);
                    return;
                }
            }else{
                if(opened==0){
                    System.out.println(-1);
                    return;
                }else{
                    opened--;
                    result[index]++;
                    index++;
                }
            }
        }

        if(opened + targetBalance  < 0){
            System.out.println(-1);
            return;
        }

        result[index-1] += opened + targetBalance;
        for(int i=0;i<result.length;++i){
            System.out.println(result[i]);
        }

    }

    // -----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
    // --------------------------------------------------------
}
