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

-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.util.*;

public class Main {

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

    public static void main(String[] args) {
        try {
            if (System.getProperty("ONLINE_JUDGE") != null) {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            } else {
                in = new BufferedReader(new FileReader("input.txt"));
                out = new PrintWriter("output.txt");
            }

            Locale.setDefault(Locale.US);
            solve();
            in.close();
            out.close();
        } catch (Throwable e) {
            e.printStackTrace();
        }
    }

    private static String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }
        return tok.nextToken();
    }

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

    private static byte readByte() throws IOException {
        return Byte.parseByte(readString());
    }

    private static long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    private static double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    private static char[] s;

    private static void solve() throws IOException {
        s = readString().toCharArray();

        if (s.length < 2) {
            System.out.println(-1);
            return;
        }
        Stack<Integer> openAtHash = new Stack<>();
        List<Integer> toPrint = new LinkedList<>();
        int openSinceLast = 0;

        int open = 0;
        for (int i = 0; i < s.length; i++) {
            if (open < 0) {
                System.out.println(-1);
                return;
            }

            char c = s[i];
            switch (c) {
                case '(':
                    open++;
                    openSinceLast++;
                    break;
                case ')':
                    open--;
                    if (openSinceLast > 0)
                        openSinceLast--;
                    break;
                case '#':
                    if (open <= 0) {
                        System.out.println(-1);
                        return;
                    }
                    if (openAtHash.isEmpty()) {
                        openAtHash.push(--open);
                    } else {
                        openAtHash.pop();
                        toPrint.add(1);
                        openAtHash.push(--open);
                    }
                    openSinceLast = 0;
                    break;
            }
        }

        if (open > openAtHash.peek()
                || openSinceLast > 0) {
            //too many ( since last hash
            System.out.println(-1);
            return;
        }

        for (Integer integer : toPrint) {
            System.out.println(integer);
        }

        System.out.println(open + 1);
    }
}