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

-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;
template <class A>
void read(vector<A>& v);
template <class A, size_t S>
void read(array<A, S>& a);
template <class T>
void read(T& x) {
  cin >> x;
}
void read(double& d) {
  string t;
  read(t);
  d = stod(t);
}
void read(long double& d) {
  string t;
  read(t);
  d = stold(t);
}
template <class H, class... T>
void read(H& h, T&... t) {
  read(h);
  read(t...);
}
template <class A>
void read(vector<A>& x) {
  for (auto& a : x) read(a);
}
template <class A, size_t S>
void read(array<A, S>& x) {
  for (auto& a : x) read(a);
}
const int mod = 1e9 + 7;
long long int primeLimit = 1e5;
const double PI = acos(-1);
bool prime[100000];
string LongestPalindromicPrefix(string str) {
  string temp = str + '?';
  reverse(str.begin(), str.end());
  temp += str;
  long long int n = temp.length();
  long long int lps[n];
  fill(lps, lps + n, 0);
  for (long long int i = 1; i < n; i++) {
    long long int len = lps[i - 1];
    while (len > 0 && temp[len] != temp[i]) {
      len = lps[len - 1];
    }
    if (temp[i] == temp[len]) {
      len++;
    }
    lps[i] = len;
  }
  return temp.substr(0, lps[n - 1]);
}
bool binarySearchFloat(float lower, float higher, float maxErrorAllowed,
                       long long int numberOfTimesWanttoRunCode) {
  float l = lower, r = higher;
  float eps = maxErrorAllowed;
  long long int iteration_count = numberOfTimesWanttoRunCode;
  for (long long int i = 0; i < iteration_count && l + eps < r; ++i) {
  }
}
void primefinder() {
  memset(prime, true, sizeof(prime));
  prime[1] = false;
  prime[0] = false;
  for (long long int i = 2; i < primeLimit; i++) {
    if (prime[i]) {
      for (long long int j = i * i; j < primeLimit; j += i) {
        prime[j] = false;
      }
    }
  }
}
long long fast_pow(long long int x, long long int y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = res * x;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
long long Fast_pow(long long int x, long long int y, long long int p) {
  long long res = 1;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string str;
  cin >> str;
  long long int n = str.size();
  long long int count1 = 0, count2 = 0;
  for (long long int i = 0; i < n; i++) {
    if (str[i] == '#' || str[i] == ')')
      count1++;
    else {
      count2++;
    }
    if (count1 > count2) {
      cout << "-1\n";
      return 0;
    }
  }
  long long int diff = count2 - count1;
  bool check = false;
  string res = "";
  long long int index = -1;
  long long int d = diff;
  for (long long int i = n - 1; i >= 0; i--) {
    if (str[i] == '#' && check == false) {
      res += ')';
      index = i;
      while (diff) {
        res += ')';
        diff--;
      }
      check = true;
    } else {
      if (str[i] == '#' || str[i] == ')')
        res += ')';
      else {
        res += '(';
      }
    }
  }
  reverse((res).begin(), (res).end());
  count1 = 0, count2 = 0;
  for (long long int i = 0; i < res.size(); i++) {
    if (res[i] == ')')
      count1++;
    else {
      count2++;
    }
    if (count1 > count2) {
      cout << "-1\n";
      return 0;
    }
  }
  for (long long int i = 0; i < n; i++) {
    if (str[i] == '#') {
      if (index == i)
        cout << d + 1 << "\n";
      else {
        cout << "1"
             << "\n";
      }
    }
  }
}
