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

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

public final class C {

    private static final Scanner in = new Scanner(System.in);

    private static final PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        final String input = in.next();
        in.close();

        final char[] seq = input.toCharArray();

        for (int i = 0; i < seq.length; i++) {
            if (')' == seq[i]) {
                int j = i - 1;
                while (j > -1 && seq[j] != '(') {
                    j--;
                }
                if (j == -1) {
                    out.println(-1);
                    out.flush();
                    return;
                }
                seq[j] = 0;
                seq[i] = 0;
            }
        }
        List<Integer> prints = new ArrayList<>();

        int zeroCount = 0;
        for (int i = 0; i < seq.length; i++) {
            if (seq[i] == 0) {
                zeroCount++;
            } else {
                seq[i - zeroCount] = seq[i];
            }
        }

        boolean isSolved = true;
        int opensBeforeCurrentPound = 0;
        for (int i = 0; i < seq.length - zeroCount; i++) {
            final char cur = seq[i];
            if (cur == '(') {
                opensBeforeCurrentPound++;
            } else if (cur == '#') {
                if (opensBeforeCurrentPound > 0) {
                    if (i + 1 < seq.length - zeroCount && seq[i + 1] == '#') {
                        prints.add(1);
                        opensBeforeCurrentPound--;
                    } else {
                        prints.add(opensBeforeCurrentPound);
                        opensBeforeCurrentPound = 0;
                    }
                } else {
                    prints.add(-1);
                    isSolved = false;
                }
            }
        }

        if (isSolved) {
            for (int i : prints) {
                out.println(i);
            }
        } else {
            out.println(-1);
        }

        out.flush();
    }


}