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

-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.*;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Locale;
import java.util.StringTokenizer;

public class div2_282_C implements Runnable {

    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") == null;

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");

    public static void main(String[] args) {

        new Thread(null, new div2_282_C(), "", 128 * (1L << 20)).start();

    }

    void init() throws FileNotFoundException {
        Locale.setDefault(Locale.US);
        if (ONLINE_JUDGE) {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt");
        } else {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        }
    }

    long timeBegin, timeEnd;

    void time() {
        timeEnd = System.currentTimeMillis();
        System.err.println("Time = " + (timeEnd - timeBegin));
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();

            init();
            solve();

            out.close();
            time();
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    String readString() throws IOException {

        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    String readString(String s) throws IOException {
        while (!tok.hasMoreTokens()) {
            try {
                tok = new StringTokenizer(in.readLine(), s + "\n \t");
            } catch (Exception e) {
                return null;
            }
        }
        return tok.nextToken();
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    int readInt(String s) throws IOException {
        return Integer.parseInt(readString(s));
    }

    boolean isPrime(int a) throws IOException {
        int del = 0;
        for (int i = 2; i < Math.sqrt(a) + 2; i++) {
            if (a % i == 0) {
                del = i;
                break;
            }
        }
        if (del > 0) {
            return false;
        } else return true;
    }

    void solve() throws IOException {
        char[] s = readString().toCharArray();
        int[] num=new int[s.length];
        int n=0;
        int sum=0;
        int numSH=0;
        boolean sharp=false;
        for (int i = 0; i < s.length; i++) {
            sharp=false;
            char c = s[i];
            switch (c){
                case '(':n++;sum++;break;
                case ')':n--;sum--;break;
                case '#':sharp=true;numSH++;break;
            }
            if(n<0){
                System.out.println("-1");
                return;
            }
            if(sharp)num[i]=-9999999;
            else{num[i]=n;}
        }
        if(numSH>sum){
            System.out.println("-1");return;
        }
        sum-=numSH;
        int cost[]=new int[numSH];
        Arrays.fill(cost,1);
        int p=numSH-1;
        int min=Integer.MAX_VALUE;
        for (int i = s.length-1; i >=0 ; i--) {
            if(num[i]==-9999999){
                if(min>sum){
                    cost[p]+=sum;
                    sum=0;
                    break;
                }else {
                    sum-=min;
                    cost[p] += min;
                    min = Integer.MAX_VALUE;
                    p--;
                }
            }else {
                if (num[i] < min) min = num[i];
            }
        }
        for(int i=0;i<cost.length;i++){
            System.out.println(cost[i]);
        }
    }


}
