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

-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.util.*;
public final class treasure
{
    static FastScanner sc=new FastScanner(new BufferedReader(new InputStreamReader(System.in)));
    static PrintWriter out=new PrintWriter(System.out);

    public static void main(String args[]) throws Exception
    {
		char[] a=sc.next().toCharArray();
		int[] one=new int[a.length],two=new int[a.length];
		boolean[] v=new boolean[a.length];
		List<Integer> list=new ArrayList<Integer>();
		for(int i=0;i<a.length;i++)
		{
			if(a[i]=='#')
			{
				v[i]=true;
				two[i]=1;
				list.add(1);
			}
			else if(a[i]=='(')
			{
				one[i]=1;
			}
			else
			{
				two[i]=1;
			}
		}
		int[] dp1=new int[a.length],dp2=new int[a.length];
		dp1[0]=one[0];
		dp2[0]=two[0];
		for(int i=1;i<a.length;i++)
		{
			dp1[i]=dp1[i-1]+one[i];
			dp2[i]=dp2[i-1]+two[i];
		}
		if(dp1[a.length-1]>dp2[a.length-1])
		{
			for(int i=a.length-1;i>=0;i--)
			{
				if(v[i])
				{
					int add=dp1[a.length-1]-dp2[a.length-1];
					dp2[i]+=add;
					for(int j=i+1;j<a.length;j++)
					{
						dp2[j]=dp2[j-1]+two[j];
					}
					list.set(list.size()-1,list.get(list.size()-1)+add);
					break;
				}
			}
		}
		boolean ans=true;
		for(int i=0;i<a.length;i++)
		{
			if(dp2[i]>dp1[i])
			{
				ans=false;
				break;
			}
		}
		if(ans)
		{
			for(int x:list)
			{
				out.println(x);
			}
		}
		else
		{
			out.println("-1");
		}
		out.close();
    }
}
class FastScanner
{
    BufferedReader in;
    StringTokenizer st;

    public FastScanner(BufferedReader in) {
        this.in = in;
    }
	
    public String nextToken() throws Exception {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }
	
	public String next() throws Exception {
		return nextToken().toString();
	}
	
    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
}