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

-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.*;
import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;

public class Main {

  public static void main(String[] args) throws Exception {

      new Main().solve();
  }
  
  int m;
  int k;
  int[][] a;
  int n;

  String s;
  String ns = "";
  boolean[][] u;
  int c = 0;
  LinkedList<Integer> st = new LinkedList<Integer>();
  void solve() throws Exception {
      Reader in = new Reader("1.in");
      PrintWriter out = new PrintWriter( new BufferedWriter( new OutputStreamWriter(System.out) ) );
     //PrintWriter out = new PrintWriter( new BufferedWriter( new FileWriter("1.txt") ) );
     
     String s = in.nextString();
    
     int o = 0;
     int c = 0;
     int k = 0;
     boolean ans = true;
     int t = 0;
     for (int i = 0; i < s.length(); i++) {
    
    	 if (o < 0) {
    		 ans = false;
    		 break;
    	 }
    	 
    	 if (s.charAt(i) == '(') {
    		 o++;
    		 t++;
    	 }	 
    	 if (s.charAt(i) == ')') {
    		 o--;
    		 if (t > 0)
    			 t--;
    	 }	 
    	 if (s.charAt(i) == '#') {
    		 o--;
    		 t = 0;
    		 k++;
    	 } 
     }
     
     
     if (ans) {
    	 if (o >= 0) {
    		 c = 1 + o;
    	 }
    	 else
    		 ans = false;
     }
     
     if (ans && t <= 0) {
     
     for (int i = 0; i < k-1; i++) {
    	 out.println(1);
     }
    	 
     if (k != 0)
    	 out.println(c);
     }
     else
    	 out.print(-1);
     out.flush();
     out.close();
      
  }
  
  
  
  class Reader {
      
      BufferedReader br;
      StringTokenizer token = null;
      
      Reader(String file) throws Exception {
          br = new BufferedReader( new InputStreamReader(System.in) );
          //br = new BufferedReader( new FileReader(file) );
      }
      
      String next() throws Exception {
          while (token == null || !token.hasMoreElements()) {
              token = new StringTokenizer(br.readLine());
          }
          return token.nextToken();
      }
      
      int nextInt() throws Exception {
          return Integer.parseInt(next());
      }
      
      long nextLong() throws Exception {
          return Long.parseLong(next());
      }
      
      double nextDouble() throws Exception {
          return Double.parseDouble(next());
      }
      
      char nextChar() throws Exception {
          return next().charAt(0); 
      }
      
      String nextString() throws IOException {
    	  return br.readLine();
      }
      
  }
}