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

-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.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Scanner;
import java.util.StringTokenizer;

public class Treasure {
	
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		String s = sc.next();
		int tot = 0;
		int hashes = 0;
		int lastHash = -1;
		for(int i=0;i<s.length();i++)
			if(s.charAt(i)=='(')
				tot++;
			else
				if(s.charAt(i)==')')
					tot--;
				else{
					hashes++;
					lastHash = i;
				}
		
		int tot2 = tot;
		if(tot<0)
		{
			System.out.println(-1);
			return;
		}
		StringBuilder sb = new StringBuilder();
		for(int i=0;i<s.length();i++)
			if(s.charAt(i)!='#')
				sb.append(s.charAt(i));
			else
				if(i == lastHash){
					sb.append(')');
					for(int j=0;j<tot-1;j++)
						sb.append(')');
				}
				else{
					sb.append(')');
					tot--;
				}
		
		String s2 = sb.toString();
		int sum = 0;
		for(int i=0;i<s2.length();i++)
		{
			if(s2.charAt(i)=='(')
				sum++;
			else
			{
				if(sum == 0)
				{
					System.out.println("-1");
					return;
				}
				else
					sum--;
			}
		}
		if(sum == 0)
		{
			for(int i=0;i<hashes-1;i++)
			{
				pw.println('1');
				tot2--;
			}
			pw.println(tot2);
		}
		else
			pw.println(-1);
		pw.flush();
		
	}
	static class Scanner{
		StringTokenizer st;BufferedReader br;
		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}
		public String next() throws IOException 
		{while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());return st.nextToken();}
		public int nextInt() throws IOException {return Integer.parseInt(next());}
		public long nextLong() throws IOException {return Long.parseLong(next());}
		public String nextLine() throws IOException {return br.readLine();}
		public double nextDouble() throws IOException {return Double.parseDouble(next());}
		public boolean ready() throws IOException {return br.ready();}
	}
}
