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

-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 hallarCantidades(s):
	closed = 0
	opened = 0
	signs  = 0
	for i in range(int(len(s))):
		if s[i] == ')':
			closed += 1
		else:
			if s[i] == '(':
				opened += 1
			else:
				signs += 1
	return [opened,closed,signs]


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

		
string = sys.stdin.readline()
s = list(string)
s = s[0:len(s)-1]
opened,closed,signs = hallarCantidades(s)
if closed + signs > opened:
	print '-1'
else:
	if s[0] == ')' or s[0] == '#' or s[len(s)-1] == '(':
		print '-1'
	else:
		respuesta(opened,closed,signs,s)



