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

-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

#include <bits/stdc++.h>
using namespace std;
long long int n = 0, m, l = 0, k, a, b, c, sum = 0, i, r = 0, j, second, h,
              first = 0, sc, ans = 0;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string str;
  cin >> str;
  l = str.length();
  if (str[0] == ')' || str[l - 1] == '(' || str[0] == '#') {
    cout << -1;
    return 0;
  }
  long long int leftopen[l + 5];
  long long int rightopen[l + 5];
  long long int rightclosed[l + 5];
  long long int righthash[l + 5];
  leftopen[0] = 0;
  for (i = 0; i < l - 1; i++) {
    if (str[i] == '(')
      leftopen[i + 1] = leftopen[i] + 1;
    else if (str[i] == ')')
      leftopen[i + 1] = leftopen[i] - 1;
    else
      leftopen[i + 1] = leftopen[i];
    if (leftopen[i + 1] < 0) {
      cout << -1;
      return 0;
    }
  }
  rightopen[l - 1] = 0;
  rightclosed[l - 1] = 0;
  righthash[l - 1] = 0;
  for (i = l - 2; i >= 0; i--) {
    if (str[i + 1] == '(')
      rightclosed[i] = rightclosed[i + 1] - 1;
    else if (str[i + 1] == ')')
      rightclosed[i] = rightclosed[i + 1] + 1;
    else
      rightclosed[i] = rightclosed[i + 1];
    if (str[i + 1] == '#')
      righthash[i] = righthash[i + 1] + 1;
    else
      righthash[i + 1] = righthash[i];
  }
  long long int hash = 0, lasthash, closed = 0, open = 0;
  for (i = 0; i < l; i++) {
    if (str[i] == '#') {
      hash++;
      lasthash = i;
      if ((leftopen[i] + hash - 1) == rightclosed[i] ||
          leftopen[i] + hash - 1 <= 0) {
        cout << -1;
        return 0;
      }
    }
    if (str[i] == ')') {
      closed++;
      if (leftopen[i] < hash + 1) {
        cout << -1;
        return 0;
      }
    } else
      open++;
  }
  if (rightclosed[lasthash] < 0) {
    cout << -1;
    return 0;
  }
  for (i = 0; i < hash - 1; i++) cout << 1 << endl;
  cout << leftopen[lasthash] - hash - rightclosed[lasthash] + 1;
}
