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

-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 C282_C {
    public static void main(String []args) {
        new Solution().solve();
    }
}

class Solution {
    FastReader fr = new FastReader();
    BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

    public void solve() {
        char []data = fr.nextLine().toCharArray();
        StringBuilder result = new StringBuilder();

        int q = 0;
        for (int i = 0; i < data.length; i++) {
            if (data[i] == '(') {
                q++;
            }
            if (data[i] == ')') {
                q--;
                if (q < 0) {
                    System.out.println(-1);
                    return;
                }
            }
            if (data[i] == '#') {
                q--;
                if (q < 0) {
                    System.out.println(-1);
                    return;
                }
                if (result.length() > 0) {
                    result.append("\n");
                }
                result.append(1);
            }
        }
        if (q > 0) {
            result.deleteCharAt(result.length()-1);
            result.append(q+1);
        }
        System.out.println(result);
    }
}

class FastReader {
    private InputStream is = new BufferedInputStream(System.in);
    private int bufferSize = 1 << 17;
    private byte []buffer = new byte[bufferSize];
    private int currentIndex = 0;
    private int lastIndex = 0;

    public int nextInt() {
        int result = 0;
        int minus = 1;

        byte character = readNext();

        while (character == ' ' || character == '\n' || character == '\r') {
            character = readNext();
        }

        if (character == '-') {
            minus = -1;
            character = readNext();
        }

        while (character != ' ' && character != '\n' && character != '\r') {
            result = result * 10 + (character - '0');
            character = readNext();
        }

        return minus*result;
    }

    public long nextLong() {
        long result = 0;
        int minus = 1;

        byte character = readNext();

        while (character == ' ' || character == '\n' || character == '\r') {
            character = readNext();
        }

        if (character == '-') {
            minus = -1;
            character = readNext();
        }

        while (character != ' ' && character != '\n' && character != '\r') {
            result = result * 10 + (character - '0');
            character = readNext();
        }

        return minus*result;
    }

    public String nextString() {
        StringBuffer result = new StringBuffer();

        byte character = readNext();

        while (character == ' ' || character == '\n' || character == '\r') {
            character = readNext();
        }

        while (character != ' ' && character != '\n' && character != '\r') {
            result.append((char)character);
            character = readNext();
        }

        return result.toString();
    }

    public String nextLine() {
        StringBuffer result = new StringBuffer();

        byte character = readNext();

        while (character == '\n' || character == '\r') {
            character = readNext();
        }

        while (character != '\n' && character != '\r') {
            result.append((char)character);
            character = readNext();
        }

        return result.toString();
    }

    private byte readNext() {
        if (currentIndex == lastIndex) {
            try {
                lastIndex = is.read(buffer, 0, bufferSize);
            } catch (IOException e) {
                throw new RuntimeException("What?");
            }
            if (lastIndex == -1) {
                buffer[0] = -1;
            }
            currentIndex = 0;
        }

        return buffer[currentIndex++];
    }
}