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

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

public class CF282C {
	private FastScanner in;
	private PrintWriter out;

	public void solve() throws IOException {
		String inp = in.next();
		int len = inp.length();
		int[] res = new int[len];
		int cnt = 0;
		int loc = -1;
		for (int i = 0; i < len; i++){
			res[i] = -1;
			if (inp.charAt(i) == '#'){
				loc = i;
			}
		}
		int sum = 0;
		for (int i = loc+1; i < len; i++){
			if (inp.charAt(i) == '('){
				sum++;
			}
			else {
				sum--;
			}
		}
		if (sum > 0 || inp.charAt(len-1) == '(' || inp.charAt(0) == ')'){
			out.println(-1);
			return;
		}
		outerloop:
		for (int i = 0; i < len; i++){
			if (inp.charAt(i) == '('){
				cnt++;
			}
			if (inp.charAt(i) == ')'){
				cnt--;
			}
			if (inp.charAt(i) == '#'){
				if (i == loc){
					res[i] = cnt + sum;
					cnt = 0;
					break outerloop;
				}
				if (cnt == 0){
					out.println(-1);
					return;
				}
				cnt--;
				res[i] = 1;
			}
		}
		if (cnt < 0){
			out.println(-1);
			return;
		}
		for (int i = 0; i < len; i++){
			if (res[i] != -1){
				if (res[i] <= 0){
					out.println(-1);
					return;
				}
				out.println(res[i]);
			}
		}
	}

	public static void main(String[] args) {
		new CF282C().run();
	}

	public void run() {
		try {
			in = new FastScanner();
			out = new PrintWriter(System.out);
			solve();
			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	private class FastScanner {
		private BufferedReader br;
		private StringTokenizer st;

		public FastScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		public String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

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

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

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