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

-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
s= raw_input()
count_o = 0
count_c = 0
dict_pos = 0
last_index = 0
for i in xrange(0, len(s)):
	if s[i] == '(':
		count_o += 1 
	elif s[i] == ')':
		if count_o - count_c < 0:
			print -1
			exit()
		else:
			count_c += 1
	elif s[i] == '#':
		last_index = i
		if count_o - count_c - 1 < 0:
			print -1
			exit()
		else:
			dict_pos += 1
			count_c += 1
	
if count_o - count_c < 0:
	print -1
	exit()
else:
	t_o = 0
	t_c = 0
	for z in xrange(last_index + 1, len(s)):
		if s[z] == '(':
			t_o += 1
		else:
			t_c += 1
	if t_o > t_c:
		print -1
		exit()
	for j in xrange(0,dict_pos - 1):
		print 1
	print count_o - count_c + 1