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

-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

/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
If I'm the sun, you're the moon
Because when I go up, you go down
*******************************
I'm working for the day I will surpass you
https://www.a2oj.com/Ladder16.html
*/
import java.util.*;
import java.io.*;
import java.math.*;

   public class x494A
   {
      public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         char[] arr = st.nextToken().toCharArray();
         int N = arr.length;
         if(triv(N, arr))
            System.out.println(-1);
         else
         {
            int last = N;
            for(int i=N-1; i >= 0; i--)
               if(arr[i] == '#')
               {
                  last = i;
                  break;
               }
            int cnt = 0;
            int cnt2 = 0;
            for(char c: arr)
            {
               if(c == '(')
                  cnt++;
               else if(c == ')')
                  cnt--;
               else
                  cnt2++;
            }
            if(cnt < cnt2)
               System.out.println(-1);
            else
            {
               ArrayList<Integer> ls = new ArrayList<Integer>();
               for(int i=0; i < cnt2; i++)
               {
                  if(i+1 < cnt2)
                     ls.add(1);
                  else
                     ls.add(cnt-ls.size());
               }
               int par = 0;
               int dex = 0;
               for(int i=0; i < N; i++)
               {
                  if(arr[i] == '(')
                     par++;
                  else if(arr[i] == ')')
                     par--;
                  else
                     par -= ls.get(dex++);
                  if(par < 0)
                  {
                     System.out.println(-1);
                     return;
                  }
               }
               StringBuilder sb = new StringBuilder();
               for(int x: ls)
                  sb.append(x+"\n");
               System.out.print(sb);
            }
         }
      }
      public static boolean triv(int N, char[] arr)
      {
         int a=0;
         int b=0;
         for(char c: arr)
         {
            if(c == '(')
               a++;
            else
               b++;
         }
         if(a < b)
            return true;
         return false;
      }
   }