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

-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.*;
public class A
{
	public static void main(String[] args) throws Exception
	{
		FastScanner in = new FastScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		
		String s = in.next();
		
		int left = 0;
		int right = 0;
		int last = -1;
		for(int x = 0; x < s.length(); x++)
		{
			if(s.charAt(x) == '(')
			{
				left++;
			}
			else if(s.charAt(x) == ')')
			{
				right++;
			}
			else
			{
				last = x;
			}
		}
		
		boolean possible = true;
		if(left <= right)
		{
			possible = false;
		}
		
		int val = 0;
		int empty = 0;
		ArrayList<Integer> result = new ArrayList<Integer>();
		for(int y = 0; y < s.length(); y++)
		{
			if(s.charAt(y) == '(')
			{
				val++;
			}
			else if(s.charAt(y) == ')')
			{
				val--;
			}
			else if(y == last)
			{
				if(left - right - empty <= 0 || val - (left - right - empty) < 0)
				{
					possible = false;
					break;
				}
				else
				{
					result.add(left - right - empty);
					val -= left - right - empty;
				}
			}
			else
			{
				if(val == 0)
				{
					possible = false;
					break;
				}
				else
				{
					result.add(1);
					val--;
					empty++;
				}
			}
			
			if(val < 0)
			{
				possible = false;
				break;
			}
		}
		
		if(!possible)
		{
			out.println(-1);
		}
		else
		{
			for(int r : result)
			{
				out.println(r);
			}
		}
		
		out.close();
	}
	
	static class FastScanner
	{
		BufferedReader br;
		StringTokenizer st;
		
		public FastScanner(InputStream input)
		{
			br = new BufferedReader(new InputStreamReader(input));
			st = new StringTokenizer("");
		}
		
		public String next() throws IOException
		{
			if(st.hasMoreTokens())
			{
				return st.nextToken();
			}
			else
			{
				st = new StringTokenizer(br.readLine());
				return next();
			}
		}
		
		public int nextInt() throws IOException
		{
			return Integer.parseInt(next());
		}
	}
}
