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

-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.util.ArrayList;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author ankur
 */
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) {
            // int n=in.nextInt();
            String str = in.readString();
            int lastind = -1;
            int lastcount = 0;
            for (int i = 0; i < str.length(); i++) {
                if (str.charAt(i) == '#') {
                    lastind = i;
                    lastcount = 0;
                }
                if (str.charAt(i) == ')') {
                    lastcount--;
                }
                if (str.charAt(i) == '(')
                    lastcount++;
            }
            int count = 0;
            int nopen = 0;
            int nclose = 0;
            ArrayList<Integer> list = new ArrayList<>();
            for (int i = 0; i < str.length(); i++) {
                if (str.charAt(i) == '(') {
                    nopen++;
                }
                if (str.charAt(i) == ')')
                    nclose++;
                if (str.charAt(i) == '#') {
                    if (i == lastind) {
                        list.add(nopen - nclose + lastcount);
                    } else {
                        if (nopen > nclose) {
                            nclose++;
                            list.add(1);
                        } else {
                            out.println(-1);
                            return;
                        }
                    }
                }
            }
            int coun1 = 0;
            int coun2 = 0;
            int ind = 0;
            for (int i = 0; i < str.length(); i++) {
                if (str.charAt(i) == '(') {
                    coun1++;
                }
                if (str.charAt(i) == ')')
                    coun2++;
                if (str.charAt(i) == '#') {
                    int val = list.get(ind);
                    ind++;
                    if (val + coun2 > coun1 || val <= 0) {
                        out.println(-1);
                        //                   break
                        return;
                    } else {
                        coun2 += val;

                    }
                    /// list.remove(0);
                }


            }
            if (coun1 == coun2) {
                for (int x : list)
                    out.println(x);
            } else
                out.println(-1);
        }

    }

    static class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar;
        private int snumChars;

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

        public int read() {
            //*-*------clare------
//remeber while comparing 2 non primitive data type not used ==

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

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

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

    }
}

