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

-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.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * http://codeforces.ru/contest/494/problem/A
 *
 * @author scorpion@yandex-team on 08.01.15.
 */
public class Solution494A {

  public static void main(final String[] args) throws Exception {
    final Scanner sc = new Scanner(System.in);
    final String source = sc.next();

    // store open brackets - close brackets for substring from 0 to i
    // at first we assume that # is 1 close brackets
    final int[] unclosedOpenBracketsCount = new int[source.length()];
    int unclosedOpenBrackets = 0;
    int lastNumberSign = -1;
    for (int i = 0; i < source.length(); i++) {
      switch (source.charAt(i)) {
        case ')':
          unclosedOpenBrackets--;
          break;
        case '(':
          unclosedOpenBrackets++;
          break;
        case '#':
          lastNumberSign = i;
          unclosedOpenBrackets--;
          break;
      }
      unclosedOpenBracketsCount[i] = unclosedOpenBrackets;
    }

    if (!check(source, unclosedOpenBracketsCount)) {
      System.out.println(-1);
      return;
    }

    int unopenedCloseBracketsCountAfterLastNumberSign = 0;
    for (int i = source.length() - 1; i >= 0; i--) {
      switch (source.charAt(i)) {
        case ')':
          unopenedCloseBracketsCountAfterLastNumberSign++;
          break;
        case '(':
          unopenedCloseBracketsCountAfterLastNumberSign--;
          break;
      }
      if (i == lastNumberSign) {
        break;
      }
    }

    final List<Integer> out = new ArrayList<>();
    for (int i = 0; i < source.length(); i++) {
      if (source.charAt(i) == '#') {
        if (i != lastNumberSign) {
          out.add(1);
        } else {
          out.add(unclosedOpenBracketsCount[i] - unopenedCloseBracketsCountAfterLastNumberSign + 1);
        }
      }
    }

    final int[] unclosedOpenBracketsCountAfterAdd = new int[source.length()];
    unclosedOpenBrackets = 0;
    for (int i = 0, j = 0; i < source.length(); i++) {
      switch (source.charAt(i)) {
        case ')':
          unclosedOpenBrackets--;
          break;
        case '(':
          unclosedOpenBrackets++;
          break;
        case '#':
          unclosedOpenBrackets -= out.get(j);
          j++;
          break;
      }
      unclosedOpenBracketsCountAfterAdd[i] = unclosedOpenBrackets;
    }

    if (!check(source, unclosedOpenBracketsCountAfterAdd)) {
      System.out.println(-1);
      return;
    }

    for (final Integer n : out) {
      System.out.println(n);
    }
  }

  private static boolean check(final String source, final int[] unclosedOpenBracketsCount) {
    for (int i = 0; i < source.length(); i++) {
      if (unclosedOpenBracketsCount[i] < 0) {
        return false;
      }
    }
    return true;
  }

}
