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

-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;

/**
 * Created by Egor on 13/12/14.
 */
public class TaskC {

    public static void main(String[] args) throws IOException{
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String s = reader.readLine();
        char[] c = s.toCharArray();

        int allOpen = 0;
        int allClose = 0;
        int allUnknown = 0;
        for (char current : c) {
            if (current == '(') {
                allOpen++;
            } else if (current == ')') {
                allClose++;
            } else {
                allUnknown++;
            }
        }

        StringBuilder builder = new StringBuilder();

        int delta = allOpen - allClose;
        if (delta < allUnknown) {
            System.out.println(-1);
            System.exit(0);
        }

        int[] result = new int[allUnknown];
        for (int i = 0; i < allUnknown; i++) {
            if (i == allUnknown - 1) {
                result[i] = delta - (allUnknown - 1);
//                builder.append(delta - (allUnknown - 1));
            } else {
                result[i] = 1;
//                builder.append(1);
            }
//            builder.append('\n');
        }

        int currentIndex = 0;
        int countOpen = 0;
        int countClose = 0;
        for (int i = 0; i < c.length; i++) {
            if (c[i] == '#') {
                countClose += result[currentIndex];
                currentIndex++;
            } else if (c[i] == '(') {
                countOpen++;
            } else if (c[i] == ')') {
                countClose++;
            }

            if (countClose > countOpen) {
                System.out.println(-1);
                System.exit(0);
            }
        }

        /*for (int i = 0; i < c.length; i++) {
            char current = c[i];
            if (current == '(') {
                countOpen++;
                allOpen--;
            } else if (current == ')') {
//                countClose++;
                countOpen--;
                allClose--;
            } else {
                int x = countOpen - allClose;
                if (x < 0) {
                    x = 0;
                }
                builder.append(x).append('\n');

//                countClose += x;
                allClose -= (countOpen - x);
//                countOpen -= x;
                countOpen = 0;
//                countClose = 0;
            }

//            if (countClose > countOpen) {
//                System.out.println(-1);
//                System.exit(0);
//            }
        }  */

        System.out.println(builder.toString());
    }

}
