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

-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;
bool isBeautifulTail(string inpt, int index) {
  int closeParen = 0;
  bool isBeauty = true;
  for (int i = inpt.length() - 1; i >= index; i--) {
    if (inpt[i] == ')') {
      ++closeParen;
    } else if (inpt[i] == '(') {
      if (closeParen == 0) {
        isBeauty = false;
      }
      --closeParen;
    }
  }
  return isBeauty;
}
vector<int> getParenthesisValue(string inp) {
  int openParen = 0;
  int hash = 0;
  vector<int> result;
  bool isValid = true;
  int lastHashIndex = inp.find_last_of('#');
  isValid = isBeautifulTail(inp, lastHashIndex + 1);
  for (int i = 0; i < inp.length() && isValid; i++) {
    if (inp[i] == '(') {
      ++openParen;
    } else if (inp[i] == ')') {
      if (openParen == 0) {
        isValid = false;
      }
      --openParen;
    } else if (inp[i] == '#') {
      if (openParen == 0) {
        isValid = false;
      }
      ++hash;
    }
    if (hash > 0 && openParen == 0) {
      isValid = false;
    }
  }
  if (!isValid) {
    result.push_back(0);
    result.push_back(0);
  } else {
    result.push_back(openParen);
    result.push_back(hash);
  }
  return result;
}
int main() {
  string input;
  cin >> input;
  int noSoltn = -1;
  bool solutionFound = true;
  vector<int> result = getParenthesisValue(input);
  int openParen = result[0];
  if (openParen <= 0) {
    solutionFound = false;
  } else {
    int hash = result[1];
    for (int i = hash; i > 0; i--) {
      if ((openParen - i) < 0) {
        solutionFound = false;
        break;
      } else if (i != 1) {
        cout << 1 << endl;
        --openParen;
      } else {
        cout << openParen << endl;
      }
    }
  }
  if (!solutionFound) {
    cout << noSoltn << endl;
  }
  return 0;
}
