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

-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

/*
 *
 * @author Mukesh Singh
 *
 */

/* Finding_the_Minimum_Window_in_S_which_Contains_All_Elements_from_T */

import java.io.*;
import java.util.*;
import java.text.DecimalFormat;
@SuppressWarnings("unchecked")
public class AB
{	
	
	//solve test cases
	void solve() throws Exception 
	{
		String s = in.nextToken();
		//System.out.println(s);
		LinkedList<Integer> ls = new LinkedList<Integer>();
		int left = 0 ;
		int last = -1 ;
		for(int i =0 ; i < s.length(); i++)
			if(s.charAt(i)=='#')
				last = i ;
		int l = 0 ;
		int r = 0 ;
		for(int i = last+1 ; i < s.length();i++)
			if(s.charAt(i)=='(')
				l++ ;
			else r++ ;
		if(l > r )
		{
			System.out.println(-1);
			return ;
		}
		///System.out.println("last "+last+" "+l+" "+r);
		for(int i = 0 ; i < s.length() ; i++)
		{
			char ch = s.charAt(i);
			//System.out.println(""+ch+" "+left);
			if(ch=='(')
				left++ ;
			else if(ch==')')
			{
				if(left <= 0 )
				{
					System.out.println("-1");
					return ;
				}
				else
					left -- ;
			}
			else
			{
				if(left<=0)
				{
					System.out.println("-1");
					return ;
				}
				else if(i==last)
				{
					if(left < r-l || left-r+l == 0)
					{
						System.out.println(-1);
						return ;
					}
					ls.addLast(left-r+l);
					left =  r-l;
				}
				else 
				{
					ls.addLast(1);
					left -- ;
				}
			}
		}
		if(left != 0)
		{
			System.out.println("-1");
					return ;
		}
		for(int a:ls)
			System.out.println(a+" ");
	}
	//@ main function
	public static void main(String[] args) throws Exception 
	{
		new AB();
	}
	
	InputReader in;
	PrintStream out ;
	DecimalFormat df ;
	AB() 
	{
		try 
		{
			File defaultInput = new File("file.in");
			if (defaultInput.exists()) 
				in = new InputReader("file.in");
			else 
				in = new InputReader();
			defaultInput = new File("file.out");
			if (defaultInput.exists()) 
				out = new PrintStream(new FileOutputStream("file.out"));
			else
				out = new PrintStream(System.out);
			df = new DecimalFormat("######0.00");
			solve();
			out.close();
		} 
		catch (Exception e) 
		{
			e.printStackTrace();
			System.exit(261);
		}
	}
	
	class InputReader {
		BufferedReader reader;
		StringTokenizer tokenizer;
		
		InputReader() {
			reader = new BufferedReader(new InputStreamReader(System.in));
		}
		
		InputReader(String fileName) throws FileNotFoundException {
			reader = new BufferedReader(new FileReader(new File(fileName)));
		}
		
		String readLine() throws IOException {
			return reader.readLine();
		}
		
		String nextToken() throws IOException {
			while (tokenizer == null || !tokenizer.hasMoreTokens())
				tokenizer = new StringTokenizer(readLine());
			return tokenizer.nextToken();
		}
		
		boolean hasMoreTokens() throws IOException {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				String s = readLine();
				if (s == null)
					return false;
				tokenizer = new StringTokenizer(s);
			}
			return true;
		}
		
		int nextInt() throws NumberFormatException, IOException {
			return Integer.parseInt(nextToken());
		}
		
		long nextLong() throws NumberFormatException, IOException {
			return Long.parseLong(nextToken());
		}
		
		double nextDouble() throws NumberFormatException, IOException {
			return Double.parseDouble(nextToken());
		}
	}
}
