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.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import time

s = [ i for i in input() ]
start = time.time()
ans   = [ -1 ]

if s[0] == '(':
    i = 0
    j = -1
    while (i < len(s)):
        if s[i] == '(':
            j = i
        elif s[i] == ')':
            if j == -1:
                break
            del s[j]
            del s[i-1]
            while j != -1:
                if j < len(s):
                    if s[j] == '(':
                        break
                j -=1

            i -= 2
        i += 1
 #   print(s)
    if ')' not in s:
        L = sum([1 for i in s if i=='('])
        V = sum([1 for i in s if i=='#'])

        if ( L == V ):
            ans = [ 1 for i in range(L) ]
        elif L > V:
            r = 0
            l = 0
            ans   = []
            for i in s:
                if i == '(':
                    l += 1
                else:
                    m = min(L-V+1, l)
#                    print(m, L-V+1, l)
                    if m < 1:
                        ans = [-1]
                        break
                    ans.append(m)
                    r += m
                    L -= m
                    V -= 1
 #                   print(i, ans, m, l, r, L-V+r)

#print(s)
for i in ans:
    print(i)
finish = time.time()
#print(finish - start)
