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

-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.*;
import java.util.*;
import java.math.BigInteger;

public class Main{
    final boolean isFileIO =  false;
    BufferedReader in;
    PrintWriter out;
    StringTokenizer st = new StringTokenizer("");
    String delim = " ";

    public static void main(String[] args) throws IOException {
        Main m = new Main();
        m.initIO();
        m.solve();
        m.in.close();
        m.out.close();
    }

    public void initIO() throws IOException {
        if(!isFileIO) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("strings.in"));
            out = new PrintWriter("strings.out"); 
        }
    }
  
    String nextToken() throws IOException {
        if(!st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken(delim);
    }
 
    String readLine() throws IOException {
        return in.readLine();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    public void solve() throws IOException {
        String s = readLine();
        int n = s.length();
        int[] cntOpen = new int[n + 1];
        int[] cntClose = new int[n + 1];
        for(int i = 1; i <= n; i++) {
            cntOpen[i] = cntOpen[i - 1];
            if(s.charAt(i - 1) == '(') {
                cntOpen[i]++;
            }
            cntClose[i] = cntClose[i - 1];
            if(s.charAt(i - 1) == ')') {
                cntClose[i]++;
            }
        }
        ArrayList<Integer> sharps = new ArrayList<Integer>();
        ArrayList<Integer> ans = new ArrayList<Integer>();
        for(int i = 0; i < n; i++) {
            if(s.charAt(i) == '#') {
                sharps.add(i + 1);
                ans.add(1);
            }
        }
        int bal = cntOpen[n];
        bal -= sharps.size() + cntClose[n];
        if(bal < 0) {
            out.println(-1);
            return;
        }
        for(int i = sharps.size() - 1; i >= 0; i--) {
            int pos = sharps.get(i);
            while(cntOpen[pos] - cntClose[pos] - ans.get(i) > 0 && bal > 0) {
                ans.set(i, ans.get(i) + 1);
                bal--;
            }
        }
        int cntOfSh = 0;
        if(bal > 0) {
            out.println(-1);
            return;
        }
        for(int i = 1, j = 0; i <= n; i++) {
            if(s.charAt(i - 1) == '#') {
                cntOfSh += ans.get(j++);
            }
            if(cntOpen[i] < cntClose[i] + cntOfSh) {
                out.println(-1);
                return;
            }
        }
        for(int i = 0; i < sharps.size(); i++) {
            out.println(ans.get(i));
        }
    }

}

class Utils {

    public static long binpow(long a, long exp, long mod) {
        if(exp == 0) {
            return 1;
        }
        if(exp % 2 == 0) {
            long temp = binpow(a, exp / 2, mod);
            return (temp * temp) % mod;
        } else {
            return (binpow(a, exp - 1, mod) * a) % mod;
        }
    }

    public static long inv(long a, long mod) {
        return binpow(a, mod - 2, mod);
    }

    public static long addmod(long a, long b, long mod) {
        return ((a + b) % mod + mod) % mod;
    }

    public static long gcd(long a, long b) {
        if(b == 0)
            return a;
        return gcd(b, a % b);
    }

    //mul must be < 10^18
    public static long mulmod(long a, long b, long mod) {
        return (a * b + (((a * b) / mod) + 1) * mod) % mod;
    }
}
