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

-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.util.*;

public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        Scanner sc = new Scanner(br);
        String str = br.readLine();
        int n = str.length();
        int open[] = new int[n];
        int closed[] = new int[n];
        int lastIndexOfHASH = -1;
        int totalNoOfHash = 0;
        char ch = str.charAt(0);
        if (ch == '#') {
            lastIndexOfHASH = 0;
            totalNoOfHash++;
        }
        if (ch == '(') {
            open[0]++;
        }
        if (ch == ')' || ch == '#') {
            closed[0]++;
        }
        for (int i = 1; i < n; i++) {
            ch = str.charAt(i);
            if (ch == '#') {
                lastIndexOfHASH = i;
                totalNoOfHash++;
            }
            if (ch == '(') {
                open[i] = open[i - 1] + 1;
            } else {
                open[i] = open[i - 1];
            }
            if (ch == ')' || ch == '#') {
                closed[i] = closed[i - 1] + 1;
            } else {
                closed[i] = closed[i - 1];
            }
        }
        if (isValid(open, closed)) {
            int lesser = open[n - 1] - closed[n - 1];
            for (int i = lastIndexOfHASH; i < n; i++) {
                closed[i] += lesser;
            }
            if (isValid(open, closed)) {
                for (int i = 1; i < totalNoOfHash; i++) {
                    System.out.println(1);
                }
                System.out.println(lesser + 1);
            } else {
                System.out.println("-1");
            }
        } else {
            System.out.println("-1");
        }
    }

    private static boolean isValid(int[] open, int[] closed) {
        for (int i = 0; i < open.length; i++) {
            if (closed[i] > open[i]) {
                return false;
            }
        }
        return true;
    }
}