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

-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.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class Main {
    
    public static void main(String[] args) throws Exception {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        InputReader inputReader = new InputReader(in);
        PrintWriter out = new PrintWriter(System.out);

        String str = inputReader.getNextToken();

        List<Integer> sol = new ArrayList<>();
        int open = 0;
        int last = 0;

        for(int i = 0; i < str.length(); i++) {
            if(str.charAt(i) == '(') {
                open++;
            }

            if(str.charAt(i) == ')') {
                open--;
            }

            if(str.charAt(i) == '#') {
                open--;
                sol.add(1);
                last = i + 1;
            }

            if(open < 0) {
                sol = null;
                break;
            }
        }
        
        if(!correctParanthesis(str.substring(last))) {
            sol = null;
        }

        if(open > 0 && sol != null) {
            sol.set(sol.size() - 1, open + 1);
        }

        if(sol == null) {
            out.println(-1);
        } else {
            out.println(sol.stream().map(String::valueOf).collect(Collectors.joining("\n")));
        }

        in.close();
        out.close();
    }
    
    public static boolean correctParanthesis(String str) {
        int open = 0;
        for(int i = 0; i < str.length(); i++) {
            if(str.charAt(i) == '(') {
                open++;
            }
            if(str.charAt(i) == ')') {
                open--;
            }
            
            if(open < 0) {
                return false;
            }
        }
        
        return true;
    }

    public static class InputReader {

        static final String SEPARATOR = " ";

        String[] split;
        int head = 0;
        BufferedReader in;

        public InputReader(BufferedReader in) {
            this.in = in;
        }

        private void fillBuffer() throws IOException {
            if(split == null || head >= split.length) {
                head = 0;
                split = in.readLine().split(SEPARATOR);
            }
        }

        public String getNextToken() throws IOException {
            fillBuffer();
            return split[head++];

        }

        public int getNextInt() throws IOException {
            return Integer.parseInt(getNextToken());
        }

        public long getNextLong() throws IOException {
            return Long.parseLong(getNextToken());
        }
    }

    public static <T> String arrayToString(T[] arr) {
        StringBuilder stringBuilder = new StringBuilder();
        for(T x: arr) {
            stringBuilder.append(x + " ");
        }
        return stringBuilder.toString();
    }

}