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

-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.awt.print.Book;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.lang.Thread.State;
import java.math.BigInteger;
import java.nio.file.attribute.AclEntry.Builder;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.util.TreeSet;
import javax.print.CancelablePrintJob;
import javax.swing.text.DefaultEditorKit.InsertBreakAction;

public class A {
	final static int MAX = 1000000000;
	final static int MOD = 1000000007;

	public static void main(String[] args) throws IOException {
		br = new BufferedReader(new InputStreamReader(System.in));
		out = new PrintWriter(System.out);
		sc = new StringTokenizer("");
		String line = new String();
		line = nxtTok();
		int O = 0, C = 0, hash = 0;
		int lastHash = 0;

		for (int i = 0; i < line.length(); i++) {
			if (line.charAt(i) == '(')
				O++;
			else if (line.charAt(i) == ')')
				C++;
			else {
				hash++;
				lastHash = i;
			}
		}
		if (hash + C > O) {
			out.print(-1);
			br.close();
			out.close();
			return;
		} else {
			int rem = O - C;
			int ok = 0;
			for (int i = 0; i < line.length(); i++) {
				if (line.charAt(i) == '(')
					ok++;
				else if (line.charAt(i) == ')')
					ok--;
				else {
					if (i == lastHash) {
						ok -= rem;
					} else {
						ok--;
						rem--;
					}
				}

				if (ok < 0) {
					out.print(-1);
					br.close();
					out.close();
					return;
				}
			}
			for (int i = 0; i < hash - 1; i++) {
				out.println(1);
			}
			out.println((O - C) - (hash - 1));
		}

		br.close();
		out.close();
	}

	static String nxtTok() throws IOException {
		while (!sc.hasMoreTokens()) {
			String s = br.readLine();
			if (s == null)
				return null;
			sc = new StringTokenizer(s.trim());
		}
		return sc.nextToken();
	}

	static BufferedReader br;
	static StringTokenizer sc;
	static PrintWriter out;

	static int nxtInt() throws IOException {
		return Integer.parseInt(nxtTok());
	}

	static long nxtLng() throws IOException {
		return Long.parseLong(nxtTok());
	}

	static double nxtDbl() throws IOException {
		return Double.parseDouble(nxtTok());
	}

	static int[] nxtIntArr(int n) throws IOException {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = nxtInt();
		return a;
	}

	static long[] nxtLngArr(int n) throws IOException {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nxtLng();
		return a;
	}

	static char[] nxtCharArr() throws IOException {
		return nxtTok().toCharArray();
	}

}