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

-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.*;
import java.io.*;
import java.math.*;
import java.util.*;
import java.util.Map.Entry;

import static java.lang.Math.*;

public class solver implements Runnable {
	final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
	BufferedReader in;
	PrintWriter out;
	StringTokenizer tok = new StringTokenizer("");
	String delim = " ";

	String readString() throws IOException {
		try {
			while (!tok.hasMoreTokens()) {
				tok = new StringTokenizer(in.readLine());
			}
			return tok.nextToken(delim);
		} catch (Exception e) {
			return null;
		}
	}

	int readInt() throws IOException {
		return Integer.parseInt(readString());
	}

	long readLong() throws IOException {
		return Long.parseLong(readString());
	}

	double readDouble() throws IOException {
		return Double.parseDouble(readString());
	}

	Point readPoint() throws IOException {
		return new Point(readInt(), readInt());
	}

	// ----------------------------------

	// ----------------------------------------
	void solve() throws NumberFormatException, IOException {
		char[] s = readString().toCharArray();
		int cntr = 0;
		int n = s.length;
		for (int i=0;i<n;i++){
			if (s[i] == '#') cntr++;
		}
		int[] a = new int[cntr];
		int co = 0;
		int cc = 0;
		int cur = 0;
		boolean end = false;
		for (int i=0;i<n;i++){
			if (s[i] == '('){
				co++;
			} else{
				if (s[i] == ')'){
					cc++;
					if (!end){
						if (cc > co) {
							out.println(-1);
							return;
						}
					} else{
						if (cc - co >= a[cntr-1]){
							out.println(-1);
							return;
						}
					}
				}else{
					if (cur != cntr-1){
						a[cur] = 1;
						cc++;
					} else{
						a[cur] = Math.max(1, co-cc);
						cc += a[cur];
						end = true;
					}	
					cur++;
				}
			}			
		}
		if (cc > co){
			int delta = cc - co;
			if (a[cntr -1] > delta) {
				a[cntr-1] -= delta;
				cc-=delta;
			}
			
		}
		if (cc != co){
			out.println(-1);
			return;
		}
		for (int y : a){
			out.println(y);
		}
	}

	// ----------------------------------------

	public static void main(String[] args) {
		new Thread(null, new solver(), "", 256 * (1L << 20)).start();
	}

	public void run() {
		try {
			timeBegin = System.currentTimeMillis();

			try {
				if (ONLINE_JUDGE) {
					in = new BufferedReader(new InputStreamReader(System.in));
					out = new PrintWriter(System.out);
					// in = new BufferedReader(new FileReader("caravan.in"));
					// out = new PrintWriter("caravan.out");
				} else {
					in = new BufferedReader(new FileReader("input.txt"));
					out = new PrintWriter("output.txt");
				}
			} catch (Throwable e) {
				in = new BufferedReader(new InputStreamReader(System.in));
				out = new PrintWriter(System.out);
			}

			solve();
			out.close();

			timeEnd = System.currentTimeMillis();
			if (!ONLINE_JUDGE) System.err.println("Time = " + (timeEnd - timeBegin));
		} catch (Exception e) {
			e.printStackTrace(System.err);
			System.exit(-1);
		}
	}

	long timeBegin, timeEnd;
}