Malek has recently found a treasure map. While he was looking for a treasure he found a locked door. There was a string *s* written on the door consisting of characters '(', ')' and '#'. Below there was a manual on how to open the door. After spending a long time Malek managed to decode the manual and found out that the goal is to replace each '#' with one or more ')' characters so that the final string becomes beautiful. 

Below there was also written that a string is called beautiful if for each *i* (1 ≤ *i* ≤ |*s*|) there are no more ')' characters than '(' characters among the first *i* characters of *s* and also the total number of '(' characters is equal to the total number of ')' characters. 

Help Malek open the door by telling him for each '#' character how many ')' characters he must replace it with.
The first line of the input contains a string *s* (1 ≤ |*s*| ≤ 10<sup class="upper-index">5</sup>). Each character of this string is one of the characters '(', ')' or '#'. It is guaranteed that *s* contains at least one '#' character.
'''
Created on ١٣‏/١٢‏/٢٠١٤

@author: mohamed265
'''
s = input().split(')(')
n = len(s)
tempO = tempC = temp = 0
#print(s)
for i in range(n):
    if s[i] != '':
        temp = s[i].count('#')
        if temp == 1:
            tempO = s[i].count('(') + 1 
            tempC = s[i].count(')') + 1
            if i == n-1:
                tempC -= 1
            if i == 0:
                tempO -= 1
            print(-1) if tempC >= tempO else print(tempO-tempC)
        else:
            s[i] = '(' + s[i] + ')'
            if i == 0:
                s[i] = s[i][1:]
            if i == n-1:
                s[i] = s[i][0:-1]
            s[i] += '.'
            #print(s[i])
            tempb = numOfHash = 0
            for x in s[i]:
                if x == '(' and numOfHash == 0:
                    tempb += 1
                elif x == ')':
                    tempb -= 1
                elif x == '#':
                    numOfHash += 1
                else:
                    for i in range(numOfHash - 1):
                        if tempb != 0:
                            print(1)
                            tempb -= 1
                        else:
                            print(-1)
                    if numOfHash != 0 :
                        print(tempb) if tempb != 0 else print(-1)
                    numOfHash = 0
                    tempb = 1
                    
                
                
            #t = s[i].split('#')
            #print(t)
        
        '''
            continue
        temp += 1
        print(temp - s[i].count(')'))
        temp = 0
        (((##)(#(#)
        '''