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

-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.*;
import java.text.DecimalFormat;
import java.util.*;

public class Main {

	static BufferedReader br = new BufferedReader(new InputStreamReader(
			System.in));
	static PrintWriter out = new PrintWriter(new BufferedOutputStream(
			System.out));
	static StringTokenizer st = new StringTokenizer("");

	public static String next() {
		try	{
		while (!st.hasMoreTokens()) {
			String s = br.readLine();
			if (s == null)
				return null;
			st = new StringTokenizer(s);
		}
		return st.nextToken();
		}	catch(Exception e)	{
			return	null;
		}
	}

	public static void main(String[] args) {

	//	int CASES = Integer.parseInt( next() );
		
	//	int N = Integer.parseInt( next() );
		char [] v = next().toCharArray();
		int N = v.length;
		int ans [] = new int [N];
		int len = 0;
		int open = 0;
		boolean ok = true;
		
		for (int i = 0; i < N && ok; i++)	{
			char ch = v[i];
			switch (ch) {
			case '(':
				open++;
			break;
			
			case ')':
				if	( --open < 0 )	{
					for (int k = len - 1; k >= 0; k--)	{
						if	( ans[k] > 1 )	{
							ans[k]--;
							open++;
							break;
						}
					}
				}
				if	( open < 0 )
					ok = false;
			break;
			
			case '#':
				if	( open == 0 )	{

					for (int k = len - 1; k >= 0; k--)	{
						if	( ans[k] > 1 )	{
							ans[k]--;
							open++;
							break;
						}
					}
				}

				if	( open == 0 )
					ok = false;
				ans[len++] = open;
				open = 0;
			break;
			}
		}
		
		open = Math.abs(open);
		for (int k = len - 1; k >= 0 && open != 0; k--)	if	( ans[k] > 1 )	{
			int x = Math.min( open, ans[k] - 1 );
			
			ans[k] -= x;
		}
		
		for (int i = 0; i < len; i++)	if	( ans[i] == 0 )	{
			ok = false;
			break;
		}
		
		if	( open != 0 )
			ok = false;
		
		if	( !ok )
			out.println(-1);
		else	for (int i = 0; i < len; i++)
			out.println( ans[i] );
		
		
		out.flush();
		out.close();
	}
	
	
}










