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

-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.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.lang.String;
import java.lang.Integer;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {
    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 {
    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;
            }
        }
        //System.out.println("case" + a[len]);
        for (i = 1; i <= len; ++i) {
            if (a[i] < 0) {
                out.println(-1);
                return;
            }
        }
        for (i = len; i >= 1;) {
            if (a[len] == 0) {
                for (int ii = 1; ii <= len; ++ii) {
                    if (b[ii] > 0) {
                        out.println(b[ii]);
                    }
                }
                return;
            }
            int tmp = a[len];
            for (j = i-1; j >= 1 && b[j] == 0; --j) {
                if (tmp > a[j])
                    tmp = a[j];
            }
           // System.out.println("Case" + j);
            if (tmp > a[j])
                tmp = a[j];
            b[j] += tmp;
            a[len] -= tmp;
            i = j;
        }
    }
}

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());
    }
}