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

-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.util.Scanner;
public class Treasure{
  public static void main( String args[] ){
    
    char[] comb;
    int num;
    int countStar;
    int count;
    String str;
    int index2;
    int last;
    int req;
    int indexVar;
    
    Scanner scan = new Scanner( System.in );
    str = scan.nextLine();
    num = str.length();
    comb = new char[ num ];
    for( int index = 0; index < num; index++ ){
      comb[ index ] = str.charAt( index );
    }
    
    countStar = 0;
    for( int index = 0; index < num; index++ ){
      if( comb[ index ] == '#' ){
        countStar++;
      }
    }
    
    count = 0;
    for( int index = 0; index < num; index++ ){
      if( comb[ index ] == '(' ){
        count++;
      }
      if( comb[ index ] == ')' ){
        count--;
      }      
    }
    req = count;
    
    
    last = countStar;
    index2 = 0;
    countStar = 0;
    count = 0;
    indexVar = 0;
    while( index2 < num && count >= 0 ){
      if( comb[ index2 ] == '#' && countStar == last - 1 ){
        if( req - last + 1 <= 0){
          count = -1;
        }
        else{
          count = count - req + last - 1;
        }
        indexVar++;
        //System.out.println( "req:\t" + req );
        //System.out.println( "last: \t" + last);
      }
      if( comb[ index2 ] == '#' && countStar < last - 1 ){
        count--;
        countStar++;
        indexVar++;
      }
      if( comb[ index2 ] == '('){
        count++;
        indexVar++;
      }
      if( comb[ index2 ] == ')'){
        count--;
        indexVar++;
      }
      index2 = indexVar;
      //System.out.println( count );
    }
      
    
    if( count < 0 ){
      System.out.println( -1 );
    }
    else {
      for ( int index = 1; index < last; index++ ){
        System.out.println( 1 );
      }
      System.out.println( req - last + 1 );
    }
    
  
  }

}