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

-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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

public class Task494A {

    public static void main(String[] args) throws IOException {
        InputScanner is = new InputScanner();
        String s = is.next();

        char[] t = s.toCharArray();
        int[] cnt = new int[s.length()];
        int begin = 0, end = 0, last = 0;
        List<Integer> ans = new ArrayList<>();

        for (int i = 0; i < s.length(); i++) {
            if (t[i] == '#') {
                t[i] = ')';
                ans.add(1);
                last = i;
            }
        }

        for (int i = 0; i < s.length(); i++) {
            if (t[i] == '(') begin++;
            else end++;
            cnt[i] = begin - end;
        }

        int val = cnt[s.length()-1];
        if (val<0){
            System.out.println("-1");
            return;
        }

        for (int i=last+1 ; i<s.length() ; i++) cnt[i] -= val;

        for (int i = 0; i < s.length(); i++) {
            if (cnt[i] < 0) {
                System.out.println("-1");
                return;
            }
        }

        ans.remove(ans.size() - 1);
        ans.add(val + 1);

        StringBuffer sb = new StringBuffer();
        for (Integer i : ans) sb.append(i + "\n");
        System.out.println(sb);
    }

    static class InputScanner {
        BufferedReader br;
        StringTokenizer st;

        public InputScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public String next() throws IOException {
            if (st == null || !st.hasMoreTokens()) {
                String line = br.readLine();
                st = new StringTokenizer(line);
            }
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            String next = next();
            return Integer.parseInt(next);
        }

        public long nextLong() throws IOException {
            String next = next();
            return Long.parseLong(next);
        }
    }
}
