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

-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.InputStreamReader;
import java.io.IOException;
import java.util.StringTokenizer;
 
public class Treasure {
    public static void main(String[] args) {
        MyScanner sc = new MyScanner();
        
        String S = sc.next();
        
        char[] arr = S.toCharArray();
        for (int i = 0; i < arr.length; i++) {
        	if (arr[i] == '#') {
        		int swap = arr.length - 1;
        		for (int j = i + 1; j < arr.length; j++) {
        			if (arr[j] != ')') {
        				swap = j - 1;
        				break;
        			}
        		}
        		char temp = arr[i];
        		arr[i] = arr[swap];
        		arr[swap] = temp;
        		i = swap;
        	}
        }

        StringBuilder sb = new StringBuilder();
        int open = 0;
        int clse = 0;
        for (char c : arr) {
        	if (c == '(') {
        		open++;
        	} else if (c == ')') {
        		clse++;
        	} else if (c == '#') {
        		if (clse >= open) {
        			System.out.println(-1);
        			return;
        		} else {
        			int need = open - clse;
        			sb.append(need + "\n");
        			clse += need;
        		}
        	}
        }
        
        if (clse != open) {
        	System.out.println(-1);
        } else {
        	System.out.print(sb.toString());
        }
    }
 
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;
 
        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
 
        int nextInt() {
            return Integer.parseInt(next());
        }
 
        long nextLong() {
            return Long.parseLong(next());
        }
 
        double nextDouble() {
            return Double.parseDouble(next());
        }
 
        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
 
        String nextLine() {
            String str = "";
            try { str = br.readLine(); }
            catch (IOException e) { e.printStackTrace(); }
            return str;
        }
    }
}