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

-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.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedReader;
import java.io.IOException;
import java.util.StringTokenizer;
import java.util.HashMap;
import java.util.Map;
import java.lang.String;
import java.lang.Math;
import java.util.Arrays;
//import java.lang.Double;

public class template  {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		Task solver = new Task();
		solver.solve(in, out);
		out.close();
	}
}

class Task {
	public void solve(InputReader in, PrintWriter out) {
		String s = in.next();
		int len = s.length(), i, j;
		int[] a = new int[len+1];
		int[] b = new int[len+1];
		Arrays.fill(a, 0);
		Arrays.fill(b, 0);
		for (i = 1; i <= len; ++i) {
			if (s.charAt(i-1) == '(')
                a[i] = a[i-1] + 1;
            else {
              if (s.charAt(i-1) == '#')
                  b[i] = 1;
              a[i] = a[i-1] - 1;
            }
		}
		for (i = 1; i <= len; ++i) {
			if (a[i] < 0) {
                out.println(-1);
                return;
            }
		}
		for (i = len; i >= 1;) {
			if (a[len] == 0) break;
			if (b[len] > 0) {
				b[len] += a[len];
				a[len] = 0;
				break;
			}
            int tmp = a[len];
            for (j = i-1; j >= 1 && b[j] == 0; --j) {
                if (tmp > a[j])
                    tmp = a[j];
            }
            if (tmp > a[j])
                tmp = a[j];
            b[j] += tmp;
            a[len] -= tmp;
            i = j;
        }
        if (a[len] != 0) {
        	out.println(-1);
        }
        else for (int ii = 1; ii <= len; ++ii) {
            if (b[ii] > 0) {
                out.println(b[ii]);
            }
        }
	}
}

class InputReader {
	BufferedReader reader;
	StringTokenizer tokenize;

	InputReader(InputStream in) {
		reader = new BufferedReader(new InputStreamReader(in));
		tokenize = null;
	}

	public String next() {
		while (tokenize == null || !tokenize.hasMoreTokens()) {
			try{
				tokenize = new StringTokenizer(reader.readLine());
			}catch(IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenize.nextToken();
	}

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


