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

-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 sys

def Solution(s):
	closed = 0
	opened = 0
	signs  = 0
	k = 0 
	i = 0
	while i < len(s) and  closed + signs <= opened:
		if s[i] == ')':
			closed += 1
		else:
			if s[i] == '(':
				opened += 1
			else:
				signs += 1
				k = i
		i += 1
	if i == len(s) and closed + signs <= opened:
		return [opened,closed,signs,k]
	else:
		return 'String is not beautiful'
		
def lastBeautyTest(l):
	while not(l == []) and l[0] == ')':
		l = l[1:len(l)]
	p  = 0
	cl = 0
	op = 0
	sg = 0
	while p < len(l) and cl + sg <= op:
		if l[p] == ')':
			cl += 1
		else:
			op += 1
		p += 1
	if p == len(l) and cl + sg == op:
		return 'You are beautiful'
	else:
		return 'You are not beautiful'
	
		
def respuesta(s):
	if Solution(s) == 'String is not beautiful':
		print '-1'
	else:
		opened,closed,signs,k = Solution(s)
		l = s[k+1:len(s)]
		if lastBeautyTest(l) == 'You are beautiful':
			j = 1
			while j < signs:
				print '1'
				j += 1
			print opened - closed - signs + 1
		else:
			print -1

string = sys.stdin.readline()
s = list(string)
s = s[0:len(s)-1]
respuesta(s)
