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

-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;
string s;
vector<long long int> answervec, anotherVector;
long long int ayush, mishra, google;
long long int storage[100000];
int main() {
  long long int a, b;
  cin >> s;
  long long int res = 0, balans = 0;
  for (long long int iter = 0; iter < s.length(); iter++) {
    storage[iter] = 0;
    if (s[iter] == '(') {
      ayush++;
      storage[iter] = -1;
    }
    if (s[iter] == ')') {
      mishra++;
      storage[iter] = 1;
    }
    if (s[iter] == '#') google++;
  }
  if (ayush - mishra - google < 0) {
    cout << "-1";
    return 0;
  }
  long long int resi = ayush - mishra - google + 1;
  bool bil = false;
  long long int bal = 0;
  for (long long int iter = s.length() - 1; iter >= 0; iter--) {
    if (storage[iter] == 0) {
      if (!bil) {
        bal += resi;
        answervec.push_back(resi);
        bil = true;
      } else {
        bal++;
        answervec.push_back(1);
      }
      continue;
    }
    bal += storage[iter];
    if (bal < 0) {
      cout << "-1";
      return 0;
    }
  }
  for (long long int iter = answervec.size() - 1; iter >= 0; iter--) {
    cout << answervec[iter] << endl;
  }
  return 0;
}
