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

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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            String s = in.next();
            int lB = 0;
            int rB = 0;
            int sharp = 0;
            for (int i = 0; i < s.length(); i++) {
                if (s.charAt(i) == '(') lB++;
                else if (s.charAt(i) == ')') rB++;
                else if (s.charAt(i) == '#') sharp++;
            }
            if (lB < rB + sharp) out.println(-1);
            else {
                int[] ans = new int[sharp];
                int curInd = 0;
                int unusedLB = lB - rB;
                int bal = 0;
                int lastBal = 0;
                for (int i = 0; i < s.length(); i++) {
                    if (s.charAt(i) == '(') bal++;
                    else if (s.charAt(i) == ')') bal--;
                    if (bal < 0) {
                        out.println(-1);
                        return;
                    }
                    if (s.charAt(i) == '#') {
                        if (bal == 0) {
                            out.println(-1);
                            return;
                        } else {
                            ans[curInd] = 1;
                            curInd++;
                            bal--;
                            unusedLB--;
                            lastBal = bal;
                        }
                    }
                }
                ans[sharp - 1] += unusedLB;
                bal = 0;
                curInd = 0;
                for (int i = 0; i < s.length(); i++) {
                    if (s.charAt(i) == '(') bal++;
                    else if (s.charAt(i) == ')') bal--;
                    else if (s.charAt(i) == '#') {
                        bal -= ans[curInd];
                        curInd++;
                    }
                    if (bal < 0) {
                        out.println(-1);
                        return;
                    }
                }
                for (int i : ans) out.println(i);
            }
        }

    }

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

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

        private void fillTokenizer() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
        }

        public String next() {
            fillTokenizer();
            return tokenizer.nextToken();
        }

    }
}

