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

-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.InputStream;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

public class Main {
    static IO io = new IO();

    public static boolean check(String s){
        int cnt = 0;
        for(int i = 0; i < s.length(); i++){
            cnt += (s.charAt(i) == '('? 1: -1);
            if(cnt < 0)
                return false;
        }
        return cnt == 0;
    }

    public static String join(int[] arr){
        StringJoiner sj = new StringJoiner("\n");
        for(int a: arr)
            sj.add("" + a);
        return sj.toString();
    }

    public static void main(String[] args) throws Exception{
        int nHashes = 0;
        String ip = io.getString();
        StringBuilder sb = new StringBuilder();
        for(int i = 0; i < ip.length(); i++){
            char cur = ip.charAt(i);
            if(cur != '#')
                sb.append(cur);
            else {
                sb.append(')');
                nHashes++;
            }
        }

        String str = sb.toString();
        int[] arr = new int[str.length()];
        arr[0] = str.charAt(0) == '('? 1: -1;
        boolean isNeq = arr[0] == -1;

        for(int i = 1; i < str.length(); i++){
            if(str.charAt(i) == '(')
                arr[i] = arr[i - 1] + 1;
            else
                arr[i] = arr[i - 1] - 1;
            if(arr[i] < 0)
                isNeq = true;
        }

        if(isNeq){
            System.out.println(-1);
            return;
        }

        StringBuilder nStr = new StringBuilder();
        int[] res = new int[nHashes];
        Arrays.fill(res, 1);
        res[res.length - 1] += arr[arr.length - 1];
        int ix = 0;
        for(int i = 0; i < str.length(); i++){
            char cur = ip.charAt(i);
            if(ip.charAt(i) != '#')
                nStr.append(cur);
            else{
                for(int k = 0; k < res[ix]; k++)
                    nStr.append(')');
                ix++;
            }
        }
        if(check(nStr.toString()))
            System.out.println(join(res));
        else
            System.out.println(-1);
    }
}

class IO {
    private BufferedReader br = null;
    private StringTokenizer st = null;

    public IO() {
        this(System.in);
    }

    public IO(InputStream is) {
        this.br = new BufferedReader(new InputStreamReader(is));
    }

    public List<String> getStringArray(int n) throws IOException {
        if (n == 0)
            return new ArrayList<>();
        if (st == null || !st.hasMoreTokens())
            st = new StringTokenizer(br.readLine());
        List<String> res = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            if (!st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            res.add(st.nextToken());
        }
        return res;
    }

    public String getString() throws IOException {
        List<String> res = this.getStringArray(1);
        return res.size() == 0 ? "" : res.get(0);
    }

    public List<Integer> getIntegerArray(int n) throws IOException {
        if (n == 0)
            return new ArrayList<>();
        List<String> res = getStringArray(n);
        return res.stream().map(Integer::parseInt).collect(Collectors.toList());
    }

    public Integer getInt() throws IOException {
        List<Integer> res = this.getIntegerArray(1);
        return res.size() == 0 ? 0 : res.get(0);
    }

    public List<Long> getLongArray(int n) throws IOException {
        if (n == 0)
            return new ArrayList<>();
        List<String> res = getStringArray(n);
        return res.stream().map(Long::parseLong).collect(Collectors.toList());
    }

    public Long getLong() throws IOException {
        List<Long> res = this.getLongArray(1);
        return res.size() == 0 ? 0L : res.get(0);
    }

    public List<Double> getDoubleArray(int n) throws IOException {
        if (n == 0)
            return new ArrayList<>();
        List<String> res = getStringArray(n);
        return res.stream().map(Double::parseDouble).collect(Collectors.toList());
    }

    public Double getDouble() throws IOException {
        List<Double> res = this.getDoubleArray(1);
        return res.size() == 0 ? 0.0 : res.get(0);
    }
}