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

-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 class treasure
{
	static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
	
	public static void main(String args[])throws IOException
	{
		InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader sc = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        
        char [] s = sc.next().toCharArray();
        int open = 0;
        int close = 0;
        int hash = 0;
        int dif = 0;
        int added = 0;
        StringBuilder ans = new StringBuilder ();
        
        for (int i = 0; i<s.length; i++)
        {
        	if (s[i] == '(')
        		open++;
        	else if (s[i] == ')')
        		close++;
        	else
        		hash++;
        }
        
        for (int i = 0; i<s.length; i++)
        {
        	if (s[i] == '(')
        		dif++;
        	else if (s[i]==')')
        		dif--;
        	
        	if (dif < 0)
        	{
        		System.out.println(-1); System.exit(0);
        	}
        	if (s[i]=='#'  && hash > 1)
        	{
        		close++;
        		hash--;
        		dif--;
        		if (dif< 0)
        		{System.out.println(-1); return;}
        		added++;
        		ans.append(1+"\n");
        	}
        	
        	else if (s[i]=='#' && hash == 1)
        	{
        		int needed = open-close;
        		
        		
        	
        		dif = dif - needed;
        		if (dif < 0)
        		{System.out.println(-1); return;}
        		close += needed; 
        		added += needed;
        		ans.append(needed+"\n");
        		if (dif < 0)
        		{
        			System.out.println(-1); System.exit(0);
        		}
        		hash--;
        	}
        		
        }
        if (ans.toString().trim().equals("0"))
        {System.out.println(-1); return;}
        
        out.println(ans.toString().trim());
        
        
        
        
        
        
        
        out.close();
        out.flush();
	}

}
