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

-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 indexOf(string word, char value) {
  for (long long i = 0; i < word.length(); i++)
    if (word[i] == value) return i;
  return -1;
}
string removeCouples(string expression) {
  string newExpression = "";
  for (char i : expression) {
    if (!newExpression.empty()) {
      if (newExpression.back() == '(' and i == ')')
        newExpression.pop_back();
      else
        newExpression += i;
    } else
      newExpression += i;
  }
  return newExpression;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  string word;
  stack<char> left, right;
  bool possible = true;
  cin >> word;
  long long numerals = count(word.begin(), word.end(), '#');
  long long aux = numerals;
  for (long long i = 0; aux > 1; i++)
    if (word[i] == '#') {
      word[i] = ')';
      aux--;
    }
  for (long long i = indexOf(word, '#') + 1; i < word.length(); i++) {
    if (word[i] == ')')
      swap(word[i], word[i - 1]);
    else
      break;
  }
  const long long limit = indexOf(word, '#');
  word = removeCouples(word.substr(0, limit)) + '#' +
         removeCouples(word.substr(limit + 1));
  for (long long i = indexOf(word, '#') + 1; i < word.length(); i++) {
    if (word[i] == ')')
      swap(word[i], word[i - 1]);
    else
      break;
  }
  if (word.back() != '#' or word.size() == 1)
    cout << "-1\n";
  else {
    for (long long i = 0; i < numerals - 1; i++) cout << "1\n";
    cout << removeCouples(word).size() - 1 << '\n';
  }
  return 0;
}
