public static void main(String... args) throws IOException {
        MyScanner sc = new MyScanner();
        String txt = sc.next();
        int lCount = 0;
        int hCount = 0;
        if (!lastPartIsCorrect(txt)) {
            System.out.println("-1");
            return;
        }
        for (int i = 0; i < txt.length(); i++) {
            char ch = txt.charAt(i);

            switch (ch) {
                case '(':
                    lCount++;
                    break;
                case '#':
                    hCount++;
                case ')': {
                    if (lCount > 0) {
                        lCount--;
                    } else {
                        System.out.println("-1");
                        return;
                    }
                    break;
                }
            }
        }

        for (int i = 0; i < hCount - 1; i++) {
            System.out.println("1");
        }
        System.out.println(lCount + 1);
    }