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

-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

//package codeforces;

import java.io.*;
import java.util.*;

public class A {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    PrintWriter writer = new PrintWriter(System.out);

    A() throws IOException {
//        reader = new BufferedReader(new FileReader("input.txt"));
//        writer = new PrintWriter(new FileWriter("output.txt"));
    }

    StringTokenizer stringTokenizer;

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

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

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

    void solve() throws IOException {
        char[] s = next().toCharArray();
        int open = 0, closed = 0, lastHash = 0;
        for(int i = 0; i < s.length; i++) {
            if(s[i] == '(') open++;
            if(s[i] == ')') closed++;
            if(s[i] == '#') lastHash = i;
        }
        List<Integer> answer = new ArrayList<Integer>();
        int x = 0;
        for(int i = 0; i < s.length; i++) {
            if(s[i] == '(') {
                x++;
            }
            if(s[i] == ')') {
                x--;
                if(x < 0) {
                    writer.println(-1);
                    answer.clear();
                    break;
                }
            }
            if(s[i] == '#') {
                if(i != lastHash) {
                    x--;
                    closed++;
                    answer.add(1);
                    if(x < 0) {
                        writer.println(-1);
                        answer.clear();
                        break;
                    }
                } else {
                    int need = open - closed;
                    if(need <= 0) {
                        writer.println(-1);
                        answer.clear();
                        break;
                    }
                    answer.add(need);
                    closed += need;
                    x -= need;
                    if(x < 0) {
                        writer.println(-1);
                        answer.clear();
                        break;
                    }
                }
            }
        }
        for (Integer integer : answer) {
            writer.println(integer);
        }
        writer.close();
    }

    public static void main(String[] args) throws IOException {
        new A().solve();
    }
}
