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

-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

# 494A
# θ(|s|) time
# θ(|s|) space

__author__ = 'artyom'


# SOLUTION

def main():
    s = read(0)
    n = len(s)
    ex = 2 * s.count('(') - n
    if ex < 0:
        return -1
    res = []
    l = i = 0
    last = 0
    for c in s:
        if c == '(':
            l += 1
        else:
            if c == '#':
                if l == 0:
                    return -1
                res.append(1)
                last = i + 1
            l -= 1
        if l < 0:
            return -1
        i += 1
    while last < n and s[last] == ')':
        last += 1
    l = 0
    for c in s[last:]:
        if c == '(':
            l += 1
        else:
            l -= 1
        if l < 0:
            return -1
    res[-1] += ex
    return -1 if l > 0 else res


# HELPERS

def read(mode=1, size=None):
    # 0: String
    # 1: Integer
    # 2: List of strings
    # 3: List of integers
    # 4: Matrix of integers
    if mode == 0: return input().strip()
    if mode == 1: return int(input().strip())
    if mode == 2: return input().strip().split()
    if mode == 3: return list(map(int, input().strip().split()))
    a = []
    for _ in range(size):
        a.append(read(3))
    return a


def write(s="\n"):
    if s is None: s = ''
    if isinstance(s, tuple) or isinstance(s, list): s = '\n'.join(map(str, s))
    s = str(s)
    print(s, end="\n")


write(main())