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

-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.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.concurrent.LinkedBlockingDeque;

import javax.swing.border.Border;

public class a {

	public static long mod = (long) Math.pow(10, 9) + 7;

	private static class node {
		long a;
		long b;
		int move;

		node(long a, long b, int val) {
			this.a = a;
			this.b = b;
			this.move = val;

		}

	}

	public static class point {
		long x;
		long y;

		point(long x, long y) {
			this.x = x;
			this.y = y;
		}
	}

	public static int ch(long y) {
		int r = Long.bitCount(y);
		return r;
	}

	public static int gcd(int x, int y) {
		if (y == 0)
			return x;

		return gcd(y, x % y);
	}

	public static boolean ch(int i) {
		String y = "" + i;

		for (int j = 0; j < y.length(); j++) {
			if (y.charAt(j) == '8')
				return true;
		}
		return false;
	}

	public static int solve(int hp1, int hp2, int min1, int min2) {
		while (hp2 > 0) {
			hp1 -= min1;
			hp2 -= min2;
		}
		return hp1;
	}

	public static int min[];
	public static int max[];

	public static void build(int s, int e, int p, int a[]) {
		if (s == e) {
			min[p] = a[s];
			max[p] = a[s];
			return;
		}

		int mid = (s + e) / 2;
		build(s, mid, p * 2, a);
		build(mid + 1, e, p * 2 + 1, a);
		min[p] = Math.min(min[p * 2], min[p * 2 + 1]);
		max[p] = Math.max(max[p * 2], max[p * 2 + 1]);
	}

	public static int getMin(int s, int e, int p, int from, int to) {
		if (s > to || e < from)
			return Integer.MAX_VALUE;
		if (s >= from && e <= to)
			return min[p];
		int mid = (s + e) / 2;

		int a = getMin(s, mid, p * 2, from, to);
		int b = getMin(mid + 1, e, p * 2 + 1, from, to);
		return Math.min(a, b);

	}

	public static int getMax(int s, int e, int p, int from, int to) {
		if (s > to || e < from)
			return Integer.MIN_VALUE;
		if (s >= from && e <= to)
			return max[p];
		int mid = (s + e) / 2;

		int a = getMax(s, mid, p * 2, from, to);
		int b = getMax(mid + 1, e, p * 2 + 1, from, to);
		return Math.max(a, b);

	}

	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder qq = new StringBuilder();
		PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
		String y = in.readLine();
		int c = 0;
		int pos = 0;
		for (int i = 0; i < y.length(); i++) {
			if (y.charAt(i) == '#') {
				c++;
				pos = i;
			}
		}
		int close = 0;
		int open = 0;
		for (int i = pos + 1; i < y.length(); i++) {
			if (y.charAt(i) == '(')
				open++;
			else if (y.charAt(i) == ')') {
				if (open > 0)
					open--;
				else
					close++;
			}
		}

		int t = 0;
		for (int i = 0; i < y.length(); i++) {
			if (y.charAt(i) == '(')
				t++;
			else if (y.charAt(i) == ')')
				t--;
			else if (y.charAt(i) == '#') {

				if (c == 1) {

					if (t <= 0) {
						if (open - (t * -1) > 0) {
							qq.append((open - (t * -1)) + "\n");

							t -= ((open - (t * -1)));
						} else {
							System.out.println(-1);
							return;
						}
					} else {
						if (t + open - close == 0) {
							System.out.println(-1);
							return;
						}

						qq.append((t + open - close) + "\n");
						t -= (t + open - close);
					}
				} else {
					qq.append(1 + "\n");
					t--;
				}
				c--;
			}

			if (t == -1) {
				System.out.println(-1);
				return;
			}

		}
		if (t != 0) {
			System.out.println(-1);
			return;
		}
		System.out.print(qq);

		out.close();

	}
}