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

-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.*;
public class Treasure {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		String s = in.next();
		int n = s.length();
		int numo = 0;
		int numc = 0;
		int numh = 0;
		for(int i = 0; i < n; i ++)
		{
			if(s.charAt(i) == '#')
				numh++;
			else if(s.charAt(i) == ')')
				numc++;
			else
				numo++;
		}
		
//		System.out.println(numh + " " + numo + " " + numc);
		int numh2 = numh;
		int[] ans = new int[numh];
		int index = 0;
		int capacity = 0;
		int need = numo - numc;
		boolean possible = true;
		for(int i = 0; i < n; i ++)
		{
//			System.out.println(i + ": " + index + " " + need + " " + capacity);
			if(s.charAt(i) == ')')
			{
				capacity--;
				if(capacity < 0)
				{
//					System.out.println("overshot by: " + capacity);
					if(index == 0)
					{
						possible = false;
						break;
					}
					ans[index - 1] += capacity;
					need -=capacity;
					capacity = 0;
//					System.out.println("adjust: " + (index-1) + " to " + ans[index-1]);
					if(ans[index - 1] <= 0)
					{
//						System.out.println(capacity + " " + ans[index - 1]);
						possible = false;
						break;
					}
				}
			}
			else if(s.charAt(i) == '#')
			{
				numh--;
				ans[index] = Math.min(capacity, need - numh);
//				System.out.println("place: " + index + ", " + ans[index]);
				need -= ans[index];
				capacity -= ans[index];
				index++;
			}
			else
			{
				capacity++;
			}
		}
		for(int i = 0; i < numh2; i ++)
			if(ans[i]<=0)
			{
				possible = false;
				break;
			}
		if(possible)
			for(int i = 0; i < numh2; i ++)
				System.out.println(ans[i]);
		else
			System.out.println(-1);
	}
}
