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

-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.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.TreeMap;
import java.util.TreeSet;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class MainC {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}
class Pair implements Comparable<Pair> {
    public int front;
    public int back;
    
    Pair(int front, int back) {
        this.front = back;
        this.front = back;
    }
    public int compareTo(Pair other) {
        return this.front - other.front; 
    }
    public String toString() {
        return "[" + front + ", " + back + "]";
    }
}
class TaskC {

	public void solve(int testNumber, InputReader in, PrintWriter out) {
       char[] s = in.next().toCharArray();

        if (s[0] != '(' || s.length < 2) {
            out.write("-1\n");
            return;
        }

        int[] front = new int[s.length];
        int[] back = new int[s.length];
        front[0] = 1;

        int hash = 0;
        for (int i = 1; i < s.length; ++i) {
            front[i] = front[i-1];
            back[i] = back[i-1];

            if (s[i] == '(') ++front[i];
            else if (s[i] == ')') ++back[i];
            else hash++;
        }
        // how many ) we need to add to make num ( == num )
        int end = front[s.length - 1] - back[s.length - 1];
        if (end < hash) {
            out.write("-1\n");
            return;
        }
        int[] reps = new int[hash];

        for (int i = 0; i < hash; ++i) reps[i] = 1;
        reps[hash - 1] += end - hash;

        // Check that it is valid
        int c = 0; // index for hashes
        int f = 0;
        int b = 0;
        for (int i = 0; i < s.length; ++i) {
            if (s[i] == '(') ++f;
            else if (s[i] == ')') ++b;
            else if (s[i] == '#') {
                b += reps[c];
                c++;
            }

            if (b > f) {
                out.write("-1\n");
                return;
            }
        }

        for (int i = 0; i < hash; ++i) {
            out.write(reps[i] + "\n");
        }
    }

}

class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

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

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

}
