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

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


public class A {

    static StringTokenizer st;
    static BufferedReader br;
    static PrintWriter pw;
    public static void main(String[] args) throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        String s = next();
        int open = 0;
        int[]ans = new int[s.length()];
        int cnt = 0;
        int last = s.lastIndexOf('#');
        int cur = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i)=='(') {
                open++;
            }
            else if (s.charAt(i)==')') {
                open--;
                if (open < 0) {
                    System.out.println(-1);
                    return;
                }
            }
            else {
                ans[cnt++] = 1;
                if (i==last)
                    cur = open;
                open--;
                if (open < 0) {
                    System.out.println(-1);
                    return;
                }
            }
        }
        if (open < 0) {
            System.out.println(-1);
            return;
        }
        ans[cnt-1] = 0;
        int t = 0;
        for (int i = last+1; i < s.length(); i++) {
            if (s.charAt(i)=='(')
                t++;
            else
                t--;
        }
        ans[cnt-1] = cur+t;
        if (ans[cnt-1]<=0 || ans[cnt-1] > cur) {
            System.out.println(-1);
            return;
        }
        open = 0;
        for (int i = 0; i < cnt; i++) {
            pw.println(ans[i]);
        }
        pw.close();
    }
    private static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }
    private static long nextLong() throws IOException {
        return Long.parseLong(next());
    }
    private static double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }
    private static String next() throws IOException {
        while (st==null || !st.hasMoreTokens())
            st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }
}
