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

-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

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */



import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
/**
 *
 * @author fz
 */
public class CF_rnd282C {
    Scanner in = new Scanner(System.in);

    private CF_rnd282C() throws IOException {
        //in.nextLine();
        String s = in.nextLine();
        int len = s.length();
        int[] left = new int[len];
        int[] right = new int[len];
        int accL = 0;
        int accR = 0;
        int numSp = 0;
        for(int i = 0; i < len; i++){
            if(s.charAt(i) == '('){
                accL++;
            }
            else if(s.charAt(i) == ')')
                accR++;
            else
                numSp++;
            left[i] = accL;
            right[i] = accR;
        }
        for(int i = 0; i < len; i++){
            if(right[i] > left[i]){
                out(-1);
                return;
            }
        }
        int diff = left[len - 1] - right[len - 1];
        if(numSp > diff){
            out(-1);
            return;
        }
        for(int i = 0; i < numSp - 1; i++){
            out(1);
        }
        out(diff - numSp + 1);
        
        
        
    }

    
    private int[] ns(int n) {
        int[] res = new int[n];
        for(int i = 0; i < n; i++) {
            res[i] = in.nextInt();
        }
        return res;
    }
    private int[][] mat(int m, int n) {//m rows and n cols
        int[][] res = new int[m][n];
        for(int i = 0; i < m; i++)
            for(int j = 0; j < n; j++)
                res[i][j] = in.nextInt();
        return res;
    }
    private static void out(Object x) {
        System.out.println(x);
    }
    public static void main(String[] args) throws IOException {
        new CF_rnd282C();
    }
}
