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

-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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;

public class C implements Runnable {

    private void solve() throws IOException {
        String s = nextToken();
        int open = 0;
        int windows = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == '#') {
                windows++;
                continue;
            }
            open += (s.charAt(i) == '(' ? 1 : -1);
            if (open < 0) {
                pl(-1);
                return;
            }
        }
        int[] ans = new int[windows];
        if (open > 0) {
            int dec = 0;
            for (int i = 1; i < windows; i++) {
                ans[i - 1] = 1; 
                ++dec;
            }
            if (open <= dec) {
                pl(-1);
                return;
            }
            ans[windows - 1] = open - dec;
        } else {
            pl(-1);
            return;
        }
        
        StringBuilder all = new StringBuilder();
        int cnt = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == '#') {
                for (int j = 0; j < ans[cnt]; j++) all.append(")");
                ++cnt;
            } else {
                all.append(s.charAt(i));
            }
        }
        open = 0;
        for (int i = 0; i < all.length(); i++) {
            open += all.charAt(i) == '(' ? 1 : -1;
            if (open < 0) {
                pl(-1);
                return;
            }
        }
        if (open > 0) {
            pl(-1);
            return;
        }
        for (int e : ans) pl(e);
    }

    public static void main(String[] args) {
        new C().run();
    }

    BufferedReader reader;
    StringTokenizer tokenizer;
    PrintWriter writer;

    public void run() {
        try {
            reader = new BufferedReader(new BufferedReader(new InputStreamReader(System.in)));
            writer = new PrintWriter(System.out);
            tokenizer = null;
            solve();
            reader.close();
            writer.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    BigInteger nextBigInteger() throws IOException {
        return new BigInteger(nextToken());
    }

    String nextToken() throws IOException {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(reader.readLine());
        }
        return tokenizer.nextToken();
    }

    void p(Object... objects) {
        for (int i = 0; i < objects.length; i++) {
            if (i != 0)
                writer.print(' ');
            writer.print(objects[i]);
        }
    }

    void pl(Object... objects) {
        p(objects);
        writer.println();
    }

    int cc;

    void pf() {
        writer.printf("Case #%d: ", ++cc);
    }

}