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

-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>
#pragma warning(disable : 4996)
using namespace std;
int noAnswer() {
  cout << -1;
  return 0;
}
int main() {
  string rawString;
  cin >> rawString;
  string fullString;
  for (int i = 0; i < rawString.length(); ++i) {
    fullString.push_back(rawString[i]);
    if (rawString[i] == '#') {
      fullString.push_back(')');
    }
  }
  const int n = fullString.size();
  vector<bool> removedBrackets(n, false);
  stack<int> openedBrackets;
  for (int i = 0; i < n; ++i) {
    if (fullString[i] == '(') {
      openedBrackets.push(i);
    } else if (fullString[i] == ')') {
      if (openedBrackets.empty()) {
        return noAnswer();
      }
      removedBrackets[openedBrackets.top()] = true;
      removedBrackets[i] = true;
      openedBrackets.pop();
    }
  }
  string reducedString;
  for (int i = 0; i < n; ++i) {
    if (!removedBrackets[i]) {
      reducedString.push_back(fullString[i]);
    }
  }
  if (reducedString.empty()) {
    return 0;
  }
  if (*reducedString.rbegin() != '#') {
    return noAnswer();
  }
  vector<int> ans;
  int bracketCount = 0;
  for (int i = 0; i < reducedString.size(); ++i) {
    if (reducedString[i] == '(') {
      ++bracketCount;
    } else {
      ans.push_back(1);
    }
  }
  ans.back() += bracketCount;
  for (int i = 0; i < ans.size(); ++i) {
    cout << ans[i] << '\n';
  }
  return 0;
}
