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

-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.FileReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Stack;
import java.util.StringTokenizer;

public class Main {
    static FastReader in = new FastReader(new BufferedReader(new InputStreamReader(System.in)));
    static PrintWriter out = new PrintWriter(System.out);
    static boolean file = false;
    static final int maxn = (int)1e5+111;
    static int inf = (int)1e9;
    static long n,r,avg;
    static int a[] = new int [maxn];
    
    private static void solve() throws Exception {
        String s = in.nextToken();
        StringBuilder ans = new StringBuilder();
        Stack<Character> stack = new Stack<>();
        ans.append(s);
        
        int pos = s.lastIndexOf('#');
        String temp = s;
        s = s.substring(0, pos).replace('#', ')') + s.substring(pos);
                
        for (int i=0; i<pos; i++) {
            if (s.charAt(i)==')') {
                if (stack.isEmpty()) {
                    out.println("-1");
                    return;
                } else {
                    stack.pop();
                }
            } else {
                stack.push('(');
            }
        }
        
        Stack<Character> stack2 = new Stack<>();
        for (int i=pos+1; i<s.length(); i++) {
            if (s.charAt(i)==')') {
                if (stack2.isEmpty()) {
                    if (!stack.isEmpty()) {
                        stack.pop();
                    } else {
                        out.println("-1");
                        return;
                    }
                } else {
                    stack2.pop();
                }
            } else {
                stack2.push('(');
            }
        }
        
        if (stack2.isEmpty() && !stack.isEmpty()) {
            int num=0;
            for (int i=0; i<pos; i++) {
                if (temp.charAt(i)=='#') {
                    num++;
                    out.println(1);
                }
            }
            
            out.println(stack.size());
            
        } else {
            out.println("-1");
            return;
        }
        
        
    }   
    
    public static void main (String [] args) throws Exception {
        
        if (file) {
            in = new FastReader(new BufferedReader(new FileReader("input.txt")));
            out = new PrintWriter ("output.txt");
        }
        
        solve();
        out.close();
    }

}

class Pair implements Comparable<Pair> {
    long x,y;
    
    public Pair(long a, long b) {
        this.x = a;
        this.y = b;
    }
    @Override
    public boolean equals(Object obj) {
        Pair p = (Pair)obj;
        if (p.x == x && p.y==y) return true;
        return false;
    }
    
    @Override
    public int compareTo(Pair p) {
        if (this.y>p.y) return 1;
        else if (this.y==p.y) {
            return 0;
        }
        else return -1;
    }
    
    
    
}

class FastReader {
    BufferedReader bf;
    StringTokenizer tk = null;

    public FastReader(BufferedReader bf) {
        this.bf = bf;
    }
    
    public String nextToken () throws Exception {
        if (tk==null || !tk.hasMoreTokens()) {
            tk = new StringTokenizer(bf.readLine());
        }
        return tk.nextToken();
    }
    
    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }
    
    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }
    
    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
}