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

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

public class Code {
    public static void main(String[] args) {
        // Use the Scanner class
        MyScanner sc = new MyScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));

        String s = sc.nextLine();

        int n_open = 0;
        int n_closed = 0;
        int n_hashes = 0;

        for (char c : s.toCharArray()) {
            if (c == '(') {
                n_open++;
            } else if (c == ')') {
                n_closed++;
            } else if (c == '#') {
                n_hashes++;
            }
            if (n_hashes + n_closed > n_open) {
                System.out.println("-1");
                return;
            }
        }

        for (int i = 0; i < n_hashes -1; ++i) {
            System.out.println(1);
        }
        System.out.println(n_open - n_closed - (n_hashes - 1));

    }

    static class ItemComparator implements Comparator<Item> {

        long[] ps;
        int time;

        public ItemComparator(long[] ps) {
            this.ps = ps;
            time = 1;
        }

        @Override
        public int compare(Item o1, Item o2) {
            return Long.compare(o1.get_current_val(time, ps), o2.get_current_val(time, ps));
        }
    }

    static class Item {
        int idx;
        long initial_value;

        public Item(int idx, long init_val) {
            this.idx = idx;
            this.initial_value = init_val;
        }

        public long get_current_val(int time, long[] ps) {

            return initial_value - (ps[time] - ps[idx-1]);
        }
    }


    public static PrintWriter out;

    //-----------MyScanner class for faster input----------
    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;
       }

    }
}