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

-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.*;
import java.util.*;

public class A {

    String inputName = "";

    void solution() throws Exception {
        String s = in.next();
        int[][] count = new int[s.length() + 1][3];
        int last = -1;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == '(') {
                count[i + 1][0] = count[i][0] + 1;
                count[i + 1][1] = count[i][1];
                count[i + 1][2] = count[i][2];
            } else if (s.charAt(i) == ')') {
                count[i + 1][0] = count[i][0];
                count[i + 1][1] = count[i][1] + 1;
                count[i + 1][2] = count[i][2];
            } else {
                count[i + 1][0] = count[i][0];
                count[i + 1][1] = count[i][1];
                count[i + 1][2] = count[i][2] + 1;
                last = i + 1;
            }
            if (count[i + 1][0] < count[i + 1][1] + count[i + 1][2]) {
                out.println(-1);
                return;
            }
        }
        int d = count[s.length()][0] - count[s.length()][1]
                - count[s.length()][2] + 1;
        if (count[last][0] < count[last][1] + d) {
            out.println(-1);
        } else {
            for (int i = 0; i < count[s.length()][2] - 1; i++) {
                out.println(1);
            }
            out.println(d);
        }
    }

    public static void main(String[] args) throws Exception {
        new A().run();
    }

    Scanner in;
    PrintWriter out;

    public void run() throws Exception {
        if (inputName.equals("")) {
            in = new Scanner(System.in);
            out = new PrintWriter(System.out);
        } else {
            in = new Scanner(new File(inputName + ".in"));
            out = new PrintWriter(new File(inputName + ".out"));
        }
        solution();
        out.close();
    }

    public class Scanner {
        private final BufferedReader reader;
        private StringTokenizer tokenizer;

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

        public Scanner(File file) throws Exception {
            reader = new BufferedReader(new FileReader(file));
        }

        public String next() throws Exception {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                tokenizer = new StringTokenizer(reader.readLine());
            }
            return tokenizer.nextToken();
        }

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

        public Long nextLong() throws Exception {
            return Long.parseLong(next());
        }

        public Double nextDouble() throws Exception {
            return Double.parseDouble(next());
        }
    }
}
