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

-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.FileNotFoundException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;

public class Test2 {

	public static void main(String[] args) throws FileNotFoundException {
		Scanner input = new Scanner(System.in);
		PrintWriter write = new PrintWriter(System.out);
		String a = input.next();
		int befor = 0;
		boolean x = false;
		int z1 = 0;
		int z2 = 0;
		StringBuffer S=new StringBuffer();
		for (int i = 0; i < a.length(); i++) {
			if (a.charAt(i) == '(') {
				z1++;
				if (x) {
					x = false;
					S=S.append(String.valueOf(befor)+"\n");
					befor = 0;
				}
				befor++;
			}
			if (a.charAt(i) == ')') {
				z2++;
				befor--;
			}
			if (a.charAt(i) == '#') {
				z2++;
				if (x) {
					befor--;
					S=S.append(1+"\n");
				}
				// befor--;
				x = true;
			}
		}

		if(z2==0 || z1==0){
			System.out.println(-1);return;}
		if(z2<z1){
			 
			if(befor!=0)
				System.out.println(befor);
			System.out.println(S);
		}else
			System.out.println(-1);
	}

	// Brute force method based on recursion; exponential time cmplexity
	/*
	 * public static boolean hasSum(int [] array, int start, int sum) { if( sum
	 * == 0 ) //found the sum? return true;
	 * 
	 * if( start > array.length-1 )//reached end of the array? return false;
	 * 
	 * return hasSum(array, start+1, sum) || hasSum(array, start+1,
	 * sum-array[start]);
	 * 
	 * }
	 */

	private static boolean chackPalind(String a) {
		StringBuffer buffer = new StringBuffer(a);
		if (a.equals(String.valueOf(buffer.reverse())))
			return true;
		return false;
	}

	public static void find(int[] A, int currSum, int index, int sum, int[] solution) {

		if (currSum == sum) {

			int j = 0;
			ArrayList<Integer> list2 = new ArrayList<Integer>();
			for (int i = 0; i < solution.length; i++) {
				if (solution[i] == 1) {

					System.out.print(A[i] + " ");

				}
			}

		} else if (index == A.length) {
			return;
		} else {
			solution[index] = 1;// select the element
			currSum += A[index];
			find(A, currSum, index + 1, sum, solution);

			solution[index] = 0;// do not select the element
			currSum -= A[index];
			find(A, currSum, index + 1, sum, solution);
		}

		return;
	}
}