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

-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.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

/*
public class _495C {

}

 */

public class _495C
{
	public void solve() throws FileNotFoundException
	{
		InputStream inputStream = System.in;

		InputHelper inputHelper = new InputHelper(inputStream);

		PrintStream out = System.out;

		//actual solution
		String s = inputHelper.read();
		
		int n = s.length();
		
		int lhi = -1;
		int to = 0;
		int tc = 0;
		for(int i = 0; i < n ;i++)
		{
			if(s.charAt(i) == '#')
			{
				tc++;
				lhi = i;
			}
			else if(s.charAt(i) == '(')
			{
				to++;
			}
			else
			{
				tc++;
			}
		}
		
		if(tc > to)
		{
			System.out.println("-1");
			return;
		}
		
		List<Integer> ans = new ArrayList<Integer>();
		
		int o = 0;
		for(int i = 0; i < n; i++)
		{
			if(s.charAt(i) == '(')
			{
				o++;
			}
			else if(s.charAt(i) == ')')
			{
				o--;
				if(o < 0)
				{
					System.out.println("-1");
					return;
				}
			}
			else
			{
				if(i == lhi)
				{
					ans.add(to - tc + 1);
					
					o -= (to - tc + 1);
					
					if(o < 0)
					{
						System.out.println("-1");
						return;
					}
				}
				else
				{
					ans.add(1);
					o--;
					if(o < 0)
					{
						System.out.println("-1");
						return;
					}
				}
			}
		}

		for(int i = 0; i < ans.size(); i++)
		{
			System.out.println(ans.get(i));
		}
		//end here
	}

	public static void main(String[] args) throws FileNotFoundException
	{
		(new _495C()).solve();
	}

	class InputHelper
	{
		StringTokenizer tokenizer = null;
		private BufferedReader bufferedReader;

		public InputHelper(InputStream inputStream)
		{
			InputStreamReader inputStreamReader = new InputStreamReader(
					inputStream);
			bufferedReader = new BufferedReader(inputStreamReader, 16384);
		}

		public String read()
		{
			while (tokenizer == null || !tokenizer.hasMoreTokens())
			{
				try
				{
					String line = bufferedReader.readLine();
					if (line == null)
					{
						return null;
					}
					tokenizer = new StringTokenizer(line);
				}
				catch (IOException e)
				{
					e.printStackTrace();
				}
			}

			return tokenizer.nextToken();
		}

		public Integer readInteger()
		{
			return Integer.parseInt(read());
		}

		public Long readLong()
		{
			return Long.parseLong(read());
		}
	}
}