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

-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.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.Deque;
import java.util.StringTokenizer;

public class A494 {

    void solve(){
       char[] a = readString().toCharArray();
       int bal = 0;
       int count = 0;
       int index = 0;
       for(int i = 0;i<a.length;i++){
           if(a[i] == '#'){
               count++;
               index = i + 1;
           }
       }
       int w = count;

       int x = 0;
        Deque<Character> stack = new ArrayDeque<>();
       for(int i = index;i<a.length;i++){
           if(a[i] == '(' || stack.isEmpty() || stack.peekLast() == ')') stack.addLast(a[i]);
           else stack.pollLast();
       }
       while(!stack.isEmpty()){
           char c = stack.pollFirst();
           if(c == '('){
               out.print(-1);
               return;
           }
           x++;
       }

       int ans = 0;
       for(int i = 0;i<a.length;i++){
           if(a[i] == '(') bal++;
           else if(a[i] == ')' || count > 1) bal--;
           if(a[i] == '#'){
               count--;
               if(count == 0){
                   ans = bal;
                   break;
               }
           }
           if(bal < 0){
               out.print(-1);
               return;
           }
       }

       ans -= x;

       if(ans <= 0){
           out.print(-1);
           return;
       }


       for(int i = 0;i<w - 1;i++) out.println(1);
       out.print(ans);
    }

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

    void run(){
        init();
        solve();
        out.close();
    }

    BufferedReader in;
    PrintWriter out;

    StringTokenizer tok = new StringTokenizer("");

    void init(){
        in = new BufferedReader(new InputStreamReader(System.in));
        out  = new PrintWriter(System.out);
    }

    String readLine(){
        try{
            return in.readLine();
        }catch(Exception ex){
            throw new RuntimeException(ex);
        }
    }
    String readString(){
        while(!tok.hasMoreTokens()){
            String nextLine = readLine();
            if(nextLine == null) return null;
            tok = new StringTokenizer(nextLine);
        }
        return tok.nextToken();
    }

    int readInt(){
        return Integer.parseInt(readString());
    }

    long readLong(){
        return Long.parseLong(readString());
    }

    double readDouble(){
        return Double.parseDouble(readString());
    }
}
