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

-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.InputMismatchException;
import java.io.IOException;
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);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            String s = in.next();
            int n = s.length();
            if (s.equals("(((#)((#)"))
                n = n + 0;
            int l = 0, r = 0, cnt = 0;
            int tmp = -1, id = 0;
            for (int i = 0; i < n; i++) {
                if (s.charAt(i) == ')')
                    r++;
                else if (s.charAt(i) == '(')
                    l++;
                if (r > l) {
                    out.println(-1);
                    return;
                }
                if (s.charAt(i) != '#')
                    continue;
                id = l - r;
                tmp = i;
                cnt++;
                r++;
                if (r > l) {
                    out.println(-1);
                    return;
                }
            }
            if (tmp != -1) {
                int ll = 0, rr = 0;
                for (int i = tmp + 1; i < n; i++)
                    if (s.charAt(i) == ')')
                        rr++;
                    else
                        ll++;
                id += ll - rr;
            }
            r = r - 1 + id;
            id -= r - l;
            if (tmp != -1) {
                l = 0;
                r = 0;
                int tt = 0;
                for (int i = 0; i < n; i++) {
                    if (s.charAt(i) == ')')
                        r++;
                    else if (s.charAt(i) == '(')
                        l++;
                    if (r > l) {
                        out.println(-1);
                        return;
                    }
                    if (s.charAt(i) != '#')
                        continue;
                    if (tt == cnt - 1)
                        r += id;
                    else
                        r++;
                    tt++;
                    if (r > l) {
                        out.println(-1);
                        return;
                    }
                }
                if (l != r) {
                    out.println(-1);
                    return;
                }
            }
            for (int i = 0; i < cnt - 1; i++)
                out.println(1);
            out.println(id);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[16384];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String next() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}

