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

-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.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {

  public static void main(String[] args) {
    new Main().solve();
  }

  private void solve() {
    QuickScanner in = new QuickScanner();
    String str = in.next();
    int cntLeft = 0;
    int cntRight = 0;
    int cntSharp = 0;
    boolean check = false;
    for (char ch : str.toCharArray()) {
      switch (ch) {
        case '(':
          cntLeft++;
          break;
        case '#':
          cntSharp++;
          // Intended
        case ')':
          cntRight++;
          break;
        default:
          assert (false);
      }
      if (cntRight > cntLeft) {
        check = true;
      }
    }
    PrintWriter pw = new PrintWriter(System.out);
    if (check) {
      pw.println(-1);
    } else {
      int delta = cntLeft - cntRight;
      cntLeft = cntRight = 0;
      int cntFilled = 0;
      for (char ch : str.toCharArray()) {
        switch (ch) {
          case '(':
            cntLeft++;
            break;
          case '#':
            cntFilled++;
            if (cntFilled == cntSharp) {
              cntRight += delta;
            }
            // Intended
          case ')':
            cntRight++;
            break;
          default:
            assert (false);
        }
        if (cntRight > cntLeft) {
          check = true;
        }
      }
      if (check) {
        pw.println(-1);
      } else {
        for (int i = 0; i < cntSharp - 1; i++) {
          pw.println(1);
        }
        pw.println(delta + 1);
      }
    }
    pw.flush();
  }

  /*
   * A fast Scanner class.
   */
  private class QuickScanner {
    private BufferedReader bufferedReader = null;
    private StringTokenizer stringTokenizer = null;
    private String nextHolder = null;

    QuickScanner() {
      bufferedReader = new BufferedReader(new InputStreamReader(System.in));
    }

    public String next() {
      if (nextHolder != null) {
        String next = nextHolder;
        nextHolder = null;
        return next;
      }

      try {
        while (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
          String newLine = bufferedReader.readLine();
          if (newLine != null) {
            stringTokenizer = new StringTokenizer(newLine);
          } else {
            return null;
          }
        }
        return stringTokenizer.nextToken();
      } catch (IOException e) {
        e.printStackTrace();
        return null;
      }
    }
  }

}
