#include <bits/stdc++.h>
using namespace std;
const double PI = 2.0 * acos(0.0);
const double E = exp(1);
int x[] = {0, 0, -1, 1};
int y[] = {-1, 1, 0, 0};
template <class T1>
void deb(T1 e) {
  cout << e << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << " " << e6
       << endl;
}
template <typename T>
inline T sqr(T n) {
  return n * n;
}
inline double hypot(double x, double y) { return sqrt(sqr(x) + sqr(y)); }
template <typename T>
inline T pmod(T n, T m) {
  return ((n % m) + m) % m;
}
template <typename T>
T power(T n, int p) {
  return (p == 0) ? (T)(1) : (sqr(power(n, p >> 1)) * ((p & 1) * (n - 1) + 1));
}
template <typename T>
T bigmod(T n, int p, T m) {
  return (p == 0)
             ? (T)(1)
             : ((sqr(bigmod(n, p >> 1, m)) % m) * ((p & 1) * (n - 1) % m + 1)) %
                   m;
}
char str[1000005];
vector<int> pos;
vector<pair<int, int> > info;
vector<int> ans;
int len = 0;
int main() {
  while (scanf("%s", str) == 1) {
    int flag = 1;
    int a = 0, b = 0;
    len = strlen(str);
    for (int i = 0; i < len; i++) {
      if (str[i] == '(')
        a++;
      else if (str[i] == ')')
        b++;
      if (str[i] == '#') pos.push_back(i);
    }
    int baki = a - b;
    int ta = 0, tb = 0;
    int extra = 0;
    for (int i = 0; i < len; i++) {
      if (str[i] == '(')
        ta++;
      else if (str[i] == '(')
        tb++;
      else {
        if (i == pos[(int)pos.size() - 1]) {
          if (baki < (int)pos.size()) {
            flag = 0;
            break;
          }
          tb += (baki - (int)pos.size() + 1);
        } else
          tb++;
      }
      if (tb > ta) {
        flag = 0;
        break;
      }
    }
    if (flag == 0) {
      puts("-1");
      return 0;
    }
    for (int i = 0; i < (int)pos.size() - 1; i++) printf("1\n");
    printf("%d\n", (baki - (int)pos.size() + 1));
    return 0;
  }
}
