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

-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

/* @@@@@@@@@@@@@@@@@@@@@@@
 * @@@ Doston Akhmedov @@@
 * @@@@@@@@@@@@@@@@@@@@@@@
 */

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Locale;
import java.util.StringTokenizer;

//Do'nt Hack (Hack qilgan KO'T) 
public class r_282_c {
	static StringTokenizer st;
	static BufferedReader br;
	static PrintWriter pw;
	static int a, а = 1;

	static class sort implements Comparable<sort> {
		int a, b;

		public sort(int a, int b) {
			this.a = a;
			this.b = b;
		}

		public int compareTo(sort arg0) {
			if (this.a == arg0.a)
				return (this.b - arg0.b);
			return -(this.a - arg0.a);
		}
	}

	public static void main(String[] args) throws IOException {
		Locale.setDefault(Locale.US);
		br = new BufferedReader(new InputStreamReader(System.in));
		pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(
				System.out)));
		// gfile();

		// if(а==10){
		// pw.print(1);
		// pw.close();
		// return;
		// }
		char s[] = next().toCharArray();
		int a = 0, b = 0, c = 0;
		for (int i = s.length - 1; i > 0; i--) {
			if (s[i] == '#')
				break;
			if (s[i] == ')')
				c++;
			else
				c--;
		}
		for (int i = 0; i < s.length; i++) {
			if (s[i] == '(')
				a++;
			if (s[i] == ')')
				b++;
		}
		if (a == b||a==0) {
			pw.print(-1);
			pw.close();
			return;
		}
		a = 0;
		b = 0;
		for (int i = 0; i < s.length; i++) {
			if (s[i] == '(')
				a++;
			if (s[i] == ')') {
				b++;
			}
			if (s[i] == '#') {
				if (c != 0) {
					if (c >= a - b) {
						pw.println(0);
						c -= (a - b);
					} else {
						pw.println((a - b) - c);
						c = 0;
					}
				} else
					pw.println(a - b);
				b += (a - b);
			}
		}
		pw.close();
	}

	private static void gfile() throws IOException {
		br = new BufferedReader(new FileReader(new File("input.txt")));
		pw = new PrintWriter(new BufferedWriter(new FileWriter(new File(
				"output.txt"))));
	}

	private static int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

	private static long nextLong() throws IOException {
		return Long.parseLong(next());
	}

	private static double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}

	private static String next() throws IOException {
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}
}
