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

-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.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeMap;

public class Solution {

	static InputReader in = new InputReader(System.in);
	static OutputWriter out = new OutputWriter(System.out);
	static int exp = (int) (1e9);
	static int mod = (int) (1e9 + 7);

	public static void main(String[] args) {

		char[] str = in.readLine().toCharArray();
		char[] oldstr = str.clone();

		TreeMap<Integer, Integer> tm = new TreeMap<>();

		for (int i = 0; i < str.length; i++) {
			if (str[i] == '#') {
				tm.put(i, 1);
				str[i] = ')';
			}
		}

		Stack<Integer> st = new Stack<>();

		for (int i = 0; i < str.length; i++) {
			if (str[i] == '#') {
				continue;
			}
			if (st.isEmpty()) {
				st.add(i);
			} else if (str[i] == '(' || str[st.peek()] == ')') {
				st.add(i);
			} else {
				st.pop();
			}
		}

		for (Integer i : st) {
			if (tm.lastKey() > i) {
				int greater = tm.higherKey(i);
				tm.put(greater, tm.get(greater) + 1);
			}
		}

		ArrayList<Integer> lst = new ArrayList<>();

		for (Integer v : tm.values()) {
			lst.add(v);
		}

		StringBuilder sb = new StringBuilder();
		int idx = 0;

		for (int i = 0; i < str.length; i++) {
			if (oldstr[i] == '#') {
				for (int j = 0; j < lst.get(idx); j++) {
					sb.append(')');
				}
				idx += 1;
			} else {
				sb.append(str[i]);
			}
		}

		st.clear();

		for (int i = 0; i < sb.length(); i++) {
			if (st.isEmpty()) {
				st.add(i);
			} else if (sb.charAt(i) == '(' || sb.charAt(st.peek()) == ')') {
				st.add(i);
			} else {
				st.pop();
			}
		}

		if (st.size() == 0) {
			for (Integer v : lst) {
				System.out.println(v);
			}
		} else {
			System.out.println(-1);
		}
	}

}

class OutputWriter {
	public PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}

	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}

	public void print(Object... objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}

	public void println(Object... objects) {
		print(objects);
		writer.println();
	}

	public void close() {
		writer.close();
	}
}

class InputReader {
	private BufferedReader reader;
	private 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 String readLine() {
		try {
			return reader.readLine();
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}

	public char nextChar() {
		return next().charAt(0);
	}

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

	public long nextLong() {
		return Long.parseLong(next());
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}

	public float nextFloat() {
		return Float.parseFloat(next());
	}

}