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

-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 SolutionC {
   BufferedReader in;
   StringTokenizer str;
   PrintWriter out;
   String SK;
   
   String next() throws IOException {
      while ((str == null) || (!str.hasMoreTokens())) {
      SK = in.readLine();
      if (SK == null)
      return null;
      str = new StringTokenizer(SK);
      }
      return str.nextToken();
   }
   int nextInt() throws IOException {
      return Integer.parseInt(next());
   }
   String nexts()throws IOException {
      return in.readLine();
   }
   double nextDouble() throws IOException {
      return Double.parseDouble(next());
   }
   long nextLong() throws IOException {
      return Long.parseLong(next());
   }
   char[] charArray() throws IOException{
      return next().toCharArray();
   }
   public static void main(String[] args) throws Exception {
      new SolutionC().run();
   }
   void run() throws Exception {
      in = new BufferedReader(new InputStreamReader(System.in));
      out = new PrintWriter(System.out);
      solve();
      out.close();
   }
   void solve() throws IOException {
      char ch[] = next().toCharArray();
      int n = ch.length;
      int l=0;
      int s=0;
      int r=0;
      int b=0;
      for (int i = 0; i < n; i++) {
         if(ch[i]=='(')
            l++;
         else if(ch[i]=='#'){
            s++;
            if(s+r>l){
               out.println(-1);
               return;
            }
            b=i;
         }
         else{
            r++;
            if(s+r>l){
               out.println(-1);
               return;
            }
         }
      }
      if(r+s>l){
         out.println(-1);
         return;
      }
      int ll=0;
      int rr=0;
      for (int i = b+1; i < n; i++) {
         if(ch[i]=='(')
            ll++;
         else{
            rr++;
            if(rr>ll){
               out.println(-1);
               return;
            }
         }
      }
      if(ll!=rr){
         out.println(-1);
         return;
      }



      int rem=l-r;
      for (int i = 0; i < n; i++) {
         if(ch[i]=='#' && i==b){
            out.println(rem);
         }
         else if(ch[i]=='#'){
            out.println(1);
            rem--;
         }
      }

   }
  
}



