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

-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.IOException;
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) {
            char[] arr = in.n().toCharArray();
            int len = arr.length;
            int as = 0;
            for (int i = 0; i < len; i++) {
                if (arr[i] == '(')
                    as++;
                else if (arr[i] == ')')
                    as--;
                if (as < 0) {
                    out.println(-1);
                    return;
                }
            }
            boolean found = false;
            int index = 0;
            for (int i = len - 1; i >= 0; i--) {
                if (arr[i] == '#') {
                    index = i;
                    found = true;
                    break;
                }
            }
            int hashes = 0;
            for (int i = 0; i < index; i++) {
                if (arr[i] == '#') {
                    as--;
                    arr[i] = ')';
                    hashes++;
                }
                if (as < 0) {
                    out.println(-1);
                    return;
                }
            }
            int check = 0;
            for (int i = 0; i < len; i++) {
                if (arr[i] == '(')
                    check++;
                else if (arr[i] == ')')
                    check--;
                else
                    check -= as;
            }
            if (check != 0 || as < 1) {
                out.println(-1);
                return;
            }
            while (hashes-- > 0)
                out.println(1);
            out.println(as);
        }

    }

    static class InputReader {
        BufferedReader br;
        StringTokenizer st;

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

        public String n() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

    }
}

