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

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

public class A {

    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        char[] a = sc.next().toCharArray();

        int n = a.length, last = -1, closeAfterLast = 0;
        for (int i = n - 1; i >= 0; i--) {
            if (a[i] == ')')
                closeAfterLast++;
            else if (a[i] == '(')
                closeAfterLast--;
            else {
                last = i;
                break;
            }
        }

        int cur = 0;
        boolean valid = true;
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            if (i == last) {
                int sub = cur - closeAfterLast;
                if (sub <= 0 || closeAfterLast < 0) {
                    valid = false;
                    break;
                }
                cur -= sub;
                sb.append(sub).append('\n');
            }
            else if (a[i] == '(')
                cur++;
            else {
                cur--;
                if (cur < 0) {
                    valid = false;
                    break;
                }
                if (a[i] == '#')
                    sb.append(1).append('\n');
            }
        }

        valid &= cur == 0;
        out.print(valid? sb : "-1\n");

        out.flush();
        out.close();
    }

    static class Scanner
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream system) {br = new BufferedReader(new InputStreamReader(system));}
        public Scanner(String file) throws Exception {br = new BufferedReader(new FileReader(file));}
        public String next() throws IOException
        {
            while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }
        public String nextLine()throws IOException{return br.readLine();}
        public int nextInt() throws IOException {return Integer.parseInt(next());}
        public double nextDouble() throws IOException {return Double.parseDouble(next());}
        public char nextChar()throws IOException{return next().charAt(0);}
        public Long nextLong()throws IOException{return Long.parseLong(next());}
        public boolean ready() throws IOException{return br.ready();}
        public void waitForInput() throws InterruptedException {Thread.sleep(3000);}
    }
}
