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.
import sys
S=list(map(str,input().split()))
CL=0
CR=0
def Find(S):
         Result=[]
         for I in range(len(str(S))):
                  if str(S)[I]=='#':
                           Result.append(I)
         return Result
Sharps=Find(S)
'''
for I in str(S[0]):
        if I=='(':
                 CL+=1
        elif I==')':
                 CR+=1'''

def kmp_search(string, word):
    word_length = len(word)
    string_length = len(string)
    offsets = []
    if word_length > string_length:
        return offsets
    prefix = compute_prefix(word)
    q = 0
    for index, letter in enumerate(string):
        while q > 0 and word[q] != letter:
            q = prefix[q - 1]
        if word[q] == letter:
            q += 1
        if q == word_length:
            offsets.append(index - word_length + 1)
            q = prefix[q - 1]
    return offsets

def compute_prefix(word):
    word_length = len(word)
    prefix = [0] * word_length
    k = 0

    for q in range(1, word_length):
        while k > 0 and word[k] != word[q]:
            k = prefix[k - 1]

        if word[k + 1] == word[q]:
            k = k + 1
        prefix[q] = k
    return prefix
CL=len(kmp_search(str(S[0]),'('))
CR=len(kmp_search(str(S[0]),')'))
if not abs(CL-CR):
         print(-1)
         sys.exit()

else:
         Result=[abs(CL-CR)//len(Sharps)+1]*(abs(CL-CR)%len(Sharps))+[abs(CL-CR)//len(Sharps)]*(len(Sharps)-(abs(CL-CR)%len(Sharps)))
         '''
         Mod=
         for I in range(Mod):
                  Result[len(Result)-1-I]+=1
         '''
         '''
         while sum(Result)!=abs(CL-CR):
                  #print(Count)
                  Result[Count]+=1
                  Count-=1
                  if Count<0:
                           Count=len(Sharps)-1
         '''
         '''
         '''
for A in Result:
         print(A)
