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

-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

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		MyScanner sc = new MyScanner();
		String s = sc.nextLine();
		int len = s.length();
		char[] arr = new char[len];
		int last = -1;
		for (int i = 0; i < len; ++i){
			arr[i] = s.charAt(i);
			if (arr[i] == '#'){
				last = i;
			}
		}
		if (arr[len-1] == '(' || arr[0] != '('){
			System.out.println(-1);
			return;
		}
		boolean ok = true;
		int k = 0;
		for (int i = len-1; i >=last; --i){
			if (arr[i] == '('){
				k--;
			}else if (arr[i] == ')'){
				k++;
			}
			if (k < 0){
				ok = false;
				break;
			}
		}
		
		if (!ok){
			System.out.println(-1);
			return;
		}
		int maxR = 0;
		int minL = 0;
		List<Integer> res = new ArrayList<Integer>();
		
		for (int i = 0; i < len; ++i){
			if (arr[i] == '('){
				maxR++;
			}else if (arr[i] == ')'){
				minL++;			
			}else{				
				if (maxR <= minL){
					ok = false;
					break;
				}
				if (i != last){
					res.add(1);
					minL++;
				}else{
					res.add(maxR - minL - k);
					minL = maxR - k;
					if (minL < 1){
						ok = false;
						break;
					}
				}				
			}
			if (maxR < minL){
				ok = false;
				break;
			}
		}
		if (minL != maxR){
			ok = false;
		}
		
		if (ok){
			for (int i = 0; i < res.size(); ++i){
				System.out.println(res.get(i));
			}		
		}else{
			System.out.println(-1);
		}				
	}
	
	    //-----------PrintWriter for faster output---------------------------------
   public static PrintWriter out;
      
   //-----------MyScanner class for faster input----------
   public static class MyScanner {
      BufferedReader br;
      StringTokenizer st;
 
      public MyScanner() {
         br = new BufferedReader(new InputStreamReader(System.in));
      }
 
      String next() {
          while (st == null || !st.hasMoreElements()) {
              try {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
          return st.nextToken();
      }
 
      int nextInt() {
          return Integer.parseInt(next());
      }
 
      long nextLong() {
          return Long.parseLong(next());
      }
 
      double nextDouble() {
          return Double.parseDouble(next());
      }
 
      String nextLine(){
          String str = "";
      try {
         str = br.readLine();
      } catch (IOException e) {
         e.printStackTrace();
      }
      return str;
      }

   }
}