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

-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.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.OutputStream;



public class Treasure {
    
    static class Kattio extends PrintWriter {
        public Kattio(InputStream i) {
        super(new BufferedOutputStream(System.out));
        r = new BufferedReader(new InputStreamReader(i));
        }
        public Kattio(InputStream i, OutputStream o) {
        super(new BufferedOutputStream(o));
        r = new BufferedReader(new InputStreamReader(i));
        }

        public boolean hasMoreTokens() {
        return peekToken() != null;
        }

        public int getInt() {
        return Integer.parseInt(nextToken());
        }

        public double getDouble() { 
        return Double.parseDouble(nextToken());
        }

        public long getLong() {
        return Long.parseLong(nextToken());
        }

        public String getWord() {
        return nextToken();
        }



        private BufferedReader r;
        private String line;
        private StringTokenizer st;
        private String token;

        private String peekToken() {
        if (token == null) 
            try {
            while (st == null || !st.hasMoreTokens()) {
                line = r.readLine();
                if (line == null) return null;
                st = new StringTokenizer(line);
            }
            token = st.nextToken();
            } catch (IOException e) { }
        return token;
        }

        private String nextToken() {
        String ans = peekToken();
        token = null;
        return ans;
        }
    }
    
    /**
     * @param args
     */
    public static void main(String[] args) {
        Kattio io = new Kattio(System.in, System.out);
        String s = io.getWord();
        boolean possible = true;
        int height = 0;
        int last = 0;
        for (int i = s.length()-1; i >= 0; i--)
        {
            if (height < 0)
                possible = false;
            if (s.charAt(i) == ')')
                height ++;
            if (s.charAt(i) == '(')
                height --;
            last = i;
            if (s.charAt(i) == '#')
                break;
        }
        int lastX = 0;
        int h = 0;
        for (int i = 0; i < s.length(); i++)
        {
            if (s.charAt(i) == '(')
                h ++;
            if (s.charAt(i) == ')' || s.charAt(i) == '#')
                h --;
            if (h < 0)
                possible = false;
            if (i == last)
            {
                //System.out.println("h: "+h);
                if (h < height)
                    possible = false;
                lastX = h-height+1;
                break;
            }
        }
        //System.out.println("Height: "+height+", last: "+last);
        if (possible)
        {
            for (int i = 0; i < s.length(); i++)
            {
                if (s.charAt(i) == '#')
                {
                    if (i == last)
                        System.out.println(lastX);
                    else
                        System.out.println(1);
                }
            }
        } else System.out.println("-1");
        io.close();
    }

}
