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

-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 C {
    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String line = "";
        StringBuilder out = new StringBuilder();
        while ((line = in.readLine()) != null && line.length() != 0) {
            StringBuilder out2 = new StringBuilder();
            char[] l = line.toCharArray();
            int p = 0;
            int count = 0;
            int[] close = new int[l.length];
            close[l.length - 1] = (l[l.length - 1] != '(') ? 1 : 0;
            for (int i = l.length - 2; i >= 0; i--) {
                close[i] = close[i + 1];
                close[i] += (l[i] != '(') ? 1 : 0;
            }
            boolean pos = true;
            for (int i = 0; i < l.length; i++) {
                if (l[i] == '#') {
                    p++;
                } else if (l[i] == '(') {
                    if (p > 0) {
                        if (close[i] >= count) {
                            out2.append("1\n");
                            p--;
                            count--;
                        } else {
                            out2.append(count + "\n");
                            count = 0;
                            p--;
                        }
                    }
                    count++;
                } else {
                    count--;
                }
            }
            if (count != 0) {
                if (p > 0) {
                    if(p<=count){
                        for (int i = 0; i < p-1; i++) 
                            out2.append("1\n");
                        out2.append((count-p+1)+"\n");
                    }else{
                        out.append("-1\n");
                        pos = false;
                    }
                } else {
                    out.append("-1\n");
                    pos = false;
                }
            } else {
                if (p != 0) {
                    out.append("-1\n");
                    pos = false;
                }
            }
            if (pos)
                out.append(out2);
        }
        System.out.print(out);
    }

    public static int[] readInts(String line) {
        String[] w = line.trim().split(" ");
        int[] a = new int[w.length];
        for (int i = 0; i < w.length; i++)
            a[i] = Integer.parseInt(w[i]);
        return a;
    }
}
