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

-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.*;

public class CodeForces {
  static boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
  int a = 0, b = 0, n = 0;

  void runCase(int caseNum) throws IOException {
    String s = next();
    int count = 0;
    int last = 0;
    int cur = 0;
    int lastPos = 0;
    for (int i = 0; i < s.length(); ++i) {
      if (s.charAt(i) == '(') {
        ++cur;
      } else if (s.charAt(i) == ')') {
        --cur;
      } else {
        last = cur;
        ++count;
        lastPos = i + 1;
        --cur;
      }
      if (cur < 0) {
        System.out.println("-1");
        return;
      }
    }
    for (int i = lastPos; i < s.length(); ++i) {
      if (s.charAt(i) == '(')
        ++last;
      else
        --last;
    }
    if (cur - last + 1 != 0) {
      System.out.println("-1");
      return;
    }
    for (int i = 0; i < count - 1; ++i)
      System.out.println("1");
    System.out.println(last);
  }


  public static void main(String[] args) throws IOException {
    if (ONLINE_JUDGE) {
      in = new BufferedReader(new InputStreamReader(System.in));
      out = new PrintWriter(System.out);
    } else {
      in = new BufferedReader(new FileReader("input.txt"));
      out = new PrintWriter(System.out);
      //out = new PrintWriter("output.txt");
    }
    new CodeForces().runIt();
    out.flush();
    out.close();
    return;
  }

  static BufferedReader in;
  private StringTokenizer st;
  static PrintWriter out;

  static int pos;
  static String curInput = "";

  String next() throws IOException {
    while (!st.hasMoreTokens()) {
      String line = in.readLine();
      if (line == null) {
        return null;
      }
      st = new StringTokenizer(line);
    }
    return st.nextToken();
  }

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

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

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


  void runIt() throws IOException {
    st = new StringTokenizer("");

//        int N = nextInt();
//        for (int i = 0; i < N; i++) {
//            runCase(i + 1);
//        }
    runCase(0);
    out.flush();
  }

}