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

-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.ArrayList;
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();
        
        int pounds = 0;
        for (int i = 0; i < arr.length; i++) {
        	if (arr[i] == '#') {
        		pounds++;
        		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;
        	}
        }

        int open = 0;
        int clse = 0;
        int curr = 0;
        int last = 0;
        int lastIdx = 0;
        for (int i = 0; i < arr.length; i++) {
        	char c = arr[i];
        	if (c == '(') {
        		open++;
        	} else if (c == ')') {
        		clse++;
        	} else if (c == '#') {
    			curr++;
    			if (curr == pounds) {
    				last = open - clse;
    				lastIdx = i + 1;
    				break;
    			} else {
        			clse++;
    			}
        	}
        	if (clse > open) {
        		System.out.println(-1);
        		return;
        	}
        }
        
        for (int i = lastIdx; i < arr.length; i++) {
        	char c = arr[i];
        	if (c == '(') {
        		last++;
        	} else if (c == ')') {
        		last--;
        	}
        }
        
        if (last <= 0) {
        	System.out.println(-1);
        	return;
        }
        
        int endOpen = 0;
        int endClse = 0;
        for (int i = lastIdx; i < arr.length; i++) {
        	char c = arr[i];
        	if (c == '(') {
        		endOpen++;
        	} else if (c == ')') {
        		endClse++;
        	}
        	if (clse + endClse + last > open + endOpen) {
//        		System.out.format("i = %d, clse = %d, endClse = %d, last = %d, open = %d, endOpen = %d\n", i, clse, endClse, last, open, endOpen);
        		System.out.println(-1);
        		return;
        	}
        }
        
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < pounds - 1; i++) {
        	sb.append(1 + "\n");
        }
        sb.append(last + "\n");
        
        System.out.print(sb.toString());
        
        
        
//        ArrayList<Integer> open = new ArrayList<Integer>();
//        ArrayList<Integer> clse = new ArrayList<Integer>();
//        
//        int currOpen = 0;
//        int currClse = 0;
//        for (int i = 0; i < arr.length; i++) {
//        	if (arr[i] == '(') {
//        		currOpen++;
//        	} else if (arr[i] == ')') {
//        		currClse ++;
//        	}
//        	if (arr[i] == '#' || i == arr.length - 1) {
//        		open.add(currOpen);
//        		clse.add(currClse);
//        		currOpen = 0;
//        		currClse = 0;
//        	}
//        }
//        
//        int sumOpen = 0;
//        int sumClse = 0;
//        for (int i = 0; i < open.size() - 1; i++) {
//        	sumOpen += open.get(i);
//        	sumClse += clse.get(i);
//        	
//        }
    }
 
    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;
        }
    }
}