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

-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.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;

import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.Math.abs;

public class CF_282C {
    
    static Reader sc = new Reader();
    
    public static void main(String[] args) throws IOException {
        String s = sc.next();
        int n = s.length();
        
        ArrayList<Integer> ind = new ArrayList<Integer>();
        ArrayList<Integer> acumAt = new ArrayList<Integer>();
        
        int[] acum = new int[n];
        
        if(s.charAt(0) == '#' || s.charAt(0) == ')') {
            System.out.println(-1);
            sc.close();
            return;
        } else {
            acum[0] = 1;
        }
        
        for (int i = 1; i < s.length(); i++) {
            if(s.charAt(i) == '(') {
                acum[i] = acum[i-1] +1;
            } else if (s.charAt(i) == ')') {
                acum[i] = acum[i-1] -1;
            } else {
                ind.add(i);
                acum[i] = acum[i-1];
                acumAt.add(acum[i]);
                if(acum[i] <= 0) {
                    System.out.println(-1);
                    sc.close();
                    return;
                }
            }
        }
        int lastAcum = acumAt.get(acumAt.size()-1);
        if(acum[n-1] > lastAcum) {
            System.out.println(-1);
            sc.close();
            return;
        }
        
        int good = lastAcum - acum[n-1]; 
        
        if(acum[n-1] < ind.size()) {
            System.out.println(-1);
            sc.close();
            return;
        }
        
        for (int i = 0; i < ind.size()-1; i++) {
            System.out.println(1);
        }
        
        System.out.println(acum[n-1] - ind.size() + 1);
        
        System.out.close();
    }
    
    static class Reader {
        final private int BUFFER_SIZE = 1 << 16;private byte[] buffer;private int bufferPointer, bytesRead;
        public Reader(){buffer=new byte[BUFFER_SIZE];bufferPointer=bytesRead=0;
        }private void fillBuffer() throws IOException{bytesRead=System.in.read(buffer,bufferPointer=0,BUFFER_SIZE);if(bytesRead==-1)buffer[0]=-1;
        }private byte read() throws IOException{if(bufferPointer==bytesRead)fillBuffer();return buffer[bufferPointer++];
        }public String next() throws IOException{StringBuilder sb = new StringBuilder();byte c;while((c=read())<=' '){if(c==-1) return null;};do{sb.append((char)c);}while((c=read())>' ');if (sb.length()==0) return null;return sb.toString();
        }public String nextLine() throws IOException{StringBuilder sb = new StringBuilder();byte c;boolean read = false;while((c=read())!=-1){if(c=='\n') {read = true;break;}if(c>=' ')sb.append((char)c);}if (!read) return null;return sb.toString();
        }public int nextInt() throws IOException{int ret=0;byte c=read();while(c<=' ')c=read();boolean neg=(c=='-');if(neg)c=read();do{ret=ret*10+c-'0';}while((c=read())>='0'&&c<='9');if(neg)return -ret;return ret;
        }public long nextLong() throws IOException{long ret=0;byte c=read();while(c<=' ')c=read();boolean neg=(c=='-');if(neg)c=read();do{ret=ret*10L+c-'0';}while((c=read())>='0'&&c<='9');if(neg)return -ret;return ret;
        }public double nextDouble() throws IOException{double ret=0,div=1;byte c=read();while(c<=' ')c=read();boolean neg=(c=='-');if(neg)c = read();do {ret=ret*10+c-'0';}while((c=read())>='0'&&c<='9');if(c=='.')while((c=read())>='0'&&c<='9')ret+=(c-'0')/(div*=10);if(neg)return -ret;return ret;
        }public int[] na(int n) throws IOException{int[] a = new int[n];for(int i = 0;i < n;i++)a[i] = nextInt();return a;
        }public int[][] nm(int n, int m) throws IOException{int[][] map = new int[n][m];for(int i = 0;i < n;i++)map[i] = na(m);return map;
        }public void close() throws IOException{if(System.in==null) return;System.in.close();}
    }
    
    static void print(int[] A) {for(int i=0;i<A.length;i++){if(i!=0) System.out.print(' ');System.out.print(A[i]);}System.out.println();}
    static <T> void print(Iterable<T> A) {int i = 0;for(T act : A){if(i!=0)System.out.print(' ');System.out.print(act);i++;}System.out.println();}
    static void debug(Object... o) { System.err.println(Arrays.deepToString(o)); }
    
    /*
    long s = System.currentTimeMillis();
    debug(System.currentTimeMillis()-s+"ms");
     */
}
