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

-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.*;

public class Task494A {

    public static void main(String... args) throws NumberFormatException,
            IOException {
        Solution.main(System.in, System.out);
    }

    static class Scanner {

        private final BufferedReader br;
        private String[] cache;
        private int cacheIndex;

        Scanner(InputStream is) {
            br = new BufferedReader(new InputStreamReader(is));
            cache = new String[0];
            cacheIndex = 0;
        }

        int nextInt() throws IOException {
            if (cacheIndex >= cache.length) {
                cache = br.readLine().split(" ");
                cacheIndex = 0;
            }
            return Integer.parseInt(cache[cacheIndex++]);
        }

        long nextLong() throws IOException {
            if (cacheIndex >= cache.length) {
                cache = br.readLine().split(" ");
                cacheIndex = 0;
            }
            return Long.parseLong(cache[cacheIndex++]);
        }

        String next() throws IOException {
            if (cacheIndex >= cache.length) {
                cache = br.readLine().split(" ");
                cacheIndex = 0;
            }
            return cache[cacheIndex++];
        }

        void close() throws IOException {
            br.close();
        }

    }

    static class Solution {

        public static void main(InputStream is, OutputStream os)
                throws NumberFormatException, IOException {
            PrintWriter pw = new PrintWriter(os);
            Scanner sc = new Scanner(is);


            String s = sc.next();

            int diff = 0;
            int minDiff = 0;
            int hashes = 0;

            for (char c : s.toCharArray()) {
                if (c == '(') {
                    diff++;
                }
                if (c == ')') {
                    diff--;
                }
                if (c == '#') {
                    diff--;
                    hashes++;
                }
                minDiff = Math.min(minDiff, diff);
            }

            if (minDiff < 0 || diff < 0) {
                pw.println(-1);
                pw.flush();
                pw.close();
                return;
            }

            int lastHashIndex = s.lastIndexOf('#');

            StringBuilder sb = new StringBuilder(diff);
            for(int i = 0 ; i < diff ; i++){
                sb.append('#');
            }

            s = s.substring(0,lastHashIndex) + sb.toString() + s.substring(lastHashIndex);
            s = s.replaceAll("#",")");

            int origDiff = diff;
            diff = 0;
            minDiff = 0;

            for (char c : s.toCharArray()) {
                if (c == '(') {
                    diff++;
                }
                if (c == ')') {
                    diff--;
                }
                minDiff = Math.min(minDiff, diff);
            }

            if (minDiff < 0 || diff != 0) {
                pw.println(-1);
                pw.flush();
                pw.close();
                return;
            }


            for (int i = 0; i < hashes - 1; i++) {
                pw.println(1);
            }
            pw.println(origDiff + 1);

            pw.flush();
            sc.close();
        }
    }

}