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

-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 treasure;

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

public class Treasure {

    InputReader in;
    PrintWriter out;
    public static void main(String[] args) {
        new Treasure().Run();
    }
    
    void Solve() throws Exception{
        String s = in.readLine();
        int n = s.length();
        char[] a = s.toCharArray();
        int dd = 0, d2 = 0;
        for(int i = 0; i < n; i++){
            if(a[i] == '(') dd++; else dd--;
            if(dd < 0) { out.println("-1"); return; }
        }
        dd = 0;
        for(int i = 0; i < n; i++) {
            if(a[i] == '(') dd++;
            if(a[i] == ')') dd--;
            if(a[i] == '#') d2++;
        }
        if(dd < d2) { out.println("-1"); return; }
        int dx = d2, dp = dd, ddx = 0;
        for(int i = 0; i < n; i++){
            if(a[i] == '(') ddx++;
            if(a[i] == ')') ddx--;
            if(a[i] == '#') {
                if(dx != 1) { ddx--; dp--; dx--; }
                else { dx--; ddx -= dp; dp = 0; }
            }
            if(ddx < 0) { out.println("-1"); return; }
        }
        for(int i = 1; i < d2; i++) { out.println(1); dd--; }
        out.println(dd);
    }
    
    public void Run(){
        try{
            File defaultInput = new File("text.inp");
            if(defaultInput.exists()) in = new InputReader("text.inp");
            else in = new InputReader();
            out = new PrintWriter(System.out);
            Solve();
            out.close();
        } catch (Exception e){
            e.printStackTrace();
            System.exit(261);
        }
    }
    
    class InputReader {
        BufferedReader reader;
	StringTokenizer tokenizer;
		
	InputReader() {
            reader = new BufferedReader(new InputStreamReader(System.in));
        }
		
	InputReader(String fileName) throws FileNotFoundException {
            reader = new BufferedReader(new FileReader(new File(fileName)));
	}
		
	String readLine() throws IOException {
            return reader.readLine();
	}
		
        String nextToken() throws IOException {
            while (tokenizer == null || !tokenizer.hasMoreTokens())
            tokenizer = new StringTokenizer(readLine());
            return tokenizer.nextToken();
	}
		
	boolean hasMoreTokens() throws IOException {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                String s = readLine();
                if (s == null) return false;
		tokenizer = new StringTokenizer(s);
            }
            return true;
	}
		
	int nextInt() throws NumberFormatException, IOException {
            return Integer.parseInt(nextToken());
	}
		
	long nextLong() throws NumberFormatException, IOException {
            return Long.parseLong(nextToken());
	}
		
        double nextDouble() throws NumberFormatException, IOException {
            return Double.parseDouble(nextToken());
	}
    }
}
