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

-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.io.PrintWriter;
import java.util.*;

public class CF_Div2_282_C {

    static int INFINITY = 2000000000;

    public static void main(String[] args) throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        sc = new StringTokenizer("");

        String s = nxtTok();
        char[] array = new char[s.length()];

        int windows = 0;
        int open = 0;
        int close = 0;
        int lastWindowIndex = 0;
        for (int i = 0; i < s.length(); i++) {
            array[i] = s.charAt(i);
            if (array[i] == '#') {
                windows++;
                lastWindowIndex = i;
            } else if (array[i] == '(')
                open++;
            else if (array[i] == ')')
                close++;
        }

        int left = open - close;
        
        int count = 0;
        boolean can = true;
        if(left<1)
            can =false;
        
        for (int i = 0; i < array.length; i++) {
            if (array[i] == '(')
                count++;
            else if (array[i] == ')')
                count--;
            else if (array[i] == '#') {
                if (i == lastWindowIndex) {
                    if (left < 1) {
                        can = false;
                        break;
                    }
                    out.append(left + "\n");
                    count -= left;
                } else {
                    out.append("1\n");
                    left--;
                    count--;
                }
            }
            if (count < 0) {
                can = false;
                break;
            }
        }// end for.

        if (can && count == 0) {
            out.close();
        } else {
            System.out.println(-1);
        }

    }// end Main.

    static BufferedReader br;
    static StringTokenizer sc;
    static PrintWriter out;

    static String nxtTok() throws IOException {
        while (!sc.hasMoreTokens()) {
            String s = br.readLine();
            if (s == null)
                return null;
            sc = new StringTokenizer(s.trim());
        }
        return sc.nextToken();
    }

    static int nxtInt() throws IOException {
        return Integer.parseInt(nxtTok());
    }

    static long nxtLng() throws IOException {
        return Long.parseLong(nxtTok());
    }

    static double nxtDbl() throws IOException {
        return Double.parseDouble(nxtTok());
    }

    static int[] nxtIntArr(int n) throws IOException {
        int[] a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = nxtInt();
        return a;
    }

    static long[] nxtLngArr(int n) throws IOException {
        long[] a = new long[n];
        for (int i = 0; i < n; i++)
            a[i] = nxtLng();
        return a;
    }

    static char[] nxtCharArr() throws IOException {
        return nxtTok().toCharArray();
    }

}// end class
