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

-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.util.ArrayList;
import java.util.StringTokenizer;


public class CF282_A {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		MyScanner in = new MyScanner();
		
		char[] s = in.next().toCharArray();
		int N = s.length;
		
		int lastPound = -1;
		
		int rightSurplus = 0; // of )
		for(int i = N-1; i >= 0; i--) {
			if(s[i] == ')') {
				rightSurplus++;
			}
			else if (s[i] == '(') {
				rightSurplus--;
			}
			
			if(lastPound == -1 && s[i] == '#') {
				lastPound = i;
			}
		}
		
		int leftSurplus = 0;
		
		ArrayList<Integer> res = new ArrayList<Integer>();
		
		boolean possible = true;
		
		for(int i = 0; i < N; i++) {
			
			if(s[i] == ')') {
				rightSurplus--;
				leftSurplus++;
			}
			else if (s[i] == '(') {
				rightSurplus++;
				leftSurplus--;
			}
			else if(s[i] == '#') {
				
				if(i == lastPound) {
					int rightCount = Math.max(1, -(rightSurplus + leftSurplus));
					leftSurplus += rightCount;
					res.add(rightCount);
				}else {
					leftSurplus++;
					res.add(1);
				}
			}
			
			if(leftSurplus > 0) {
				possible = false;
			}
		}
		
		if(possible) {
			for(int i = 0; i < res.size(); i++) {
				System.out.println(res.get(i));
			}
		}else {
			System.out.println(-1);
		}
		
	}

    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}
