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

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

public class Main {

    public static void main(String args[]) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        SolverC.InputReader in = new SolverC.InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        SolverC solver = new SolverC();
        int testCount = 1;
        for (int i = 1; i <= testCount; i++) {
            solver.solve(in, out);
        }
        out.close();
    }

}

class SolverC {

    public void solve(InputReader in, PrintWriter out) {
        String s = in.next();
        int open = 0;
        int close = 0;
        int hash = 0;
        int last = -1;
        for (int i=0; i<s.length(); i++) {
            char ch = s.charAt(i);
            if (ch == '(') {
                open++;
            } else if (ch == ')') {
                close++;
            } else {
                hash++;
                last = i;
            }
        }
        int d = open - close;
        if (d < hash) {
            out.println(-1);
        } else {
            int diff = 0;
            for (int i=0; i<last; i++) {
                char ch = s.charAt(i);
                if (ch == '(') {
                    diff++;
                } else {
                    diff--;
                }
                if (diff < 0) {
                    out.println(-1);
                    return;
                }
            }
            diff -= (d - (hash - 1));
            if (diff < 0) {
                out.println(-1);
                return;
            }
            for (int i=last+1; i<s.length(); i++) {
                char ch = s.charAt(i);
                if (ch == '(') {
                    diff++;
                } else {
                    diff--;
                }
                if (diff < 0) {
                    out.println(-1);
                    return;
                }
            }
            for (int i=0; i<hash-1; i++) {
                out.println(1);
            }
            out.println(d - (hash - 1));
        }
    }

    static class InputReader {
        private final BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
        }

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

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


}
