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

-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.InputStream;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.StringTokenizer;

public class C495 {

    public static BufferedReader in;
    public static PrintWriter out;
    public static StringTokenizer tokenizer;

    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        in = new BufferedReader(new InputStreamReader(inputStream), 32768);
        out = new PrintWriter(outputStream);
        solve();
        out.close();
    }

    public static void solve() {
        String s = next();
        int n = s.length();
        int[] d = new int[n];
        int[] res = new int[n];
        if (s.charAt(0) != '(') {
            out.println(-1);
            return;
        }
        d[0] = 1;
        int opened = 1;
        int closed = 0;
        for (int i = 1; i < n; i++) {
            if (s.charAt(i) == '(') {
                opened++;
                d[i] = d[i - 1] + 1;
            } else {
                closed++;
                d[i] = d[i - 1] - 1;
            }
            if (d[i] < 0) {
                out.println(-1);
                return;
            }
            if (s.charAt(i) == '#') {
                res[i] = 1;
            }
        }
        if (opened < closed) {
            out.println(-1);
            return;
        }
        
        for (int i = n - 1; i >= 0; i--) {
            if (s.charAt(i) == '#') {
                d[i] -= (opened - closed);
                if (d[i] < 0) {
                    out.println(-1);
                    return;
                }
                res[i] += opened - closed;
                for (int j = i + 1; j < n; j++) {
                    if (s.charAt(j) == '(') {
                        d[j] = d[j - 1] + 1;
                    } else {
                        d[j] = d[j - 1] - 1;
                    }
                    if (d[j] < 0) {
                        out.println(-1);
                        return;
                    }
                }
                break;
            }
        }
        for (int i = 0; i < n; i++) {
            if (res[i] > 0) {
                out.println(res[i]);
            }
        }
    }

    public static String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(in.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

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

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

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