#include <bits/stdc++.h>
using namespace std;
long long int logy(long long int x, long long int y) {
  return ceil((long double)(log(x) / log(y)));
}
long long int powe(long long int a, long long int b) {
  long long int re = 1;
  while (b) {
    if (b & 1) re = (re * a) % 1000000007;
    a = (a * a) % 1000000007;
    b = b >> 1;
  }
  return re;
}
bool flag = 0, flag1 = 0, flag2 = 0;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int tt = 1;
  while (tt--) {
    string s;
    cin >> s;
    long long int n = s.length();
    long long int last = -1, total = 0;
    for (long long int i = 0; i < n; i++) {
      if (s[i] == '(')
        total++;
      else
        total--;
      if (s[i] == '#') last = i;
    }
    if (total < 0) {
      cout << -1;
      return 0;
    }
    long long int add = total + 1;
    total = 0;
    for (long long int i = 0; i < n; i++) {
      if (i == last)
        total -= add;
      else if (s[i] == '(')
        total++;
      else
        total--;
      if (total < 0) {
        cout << -1;
        return 0;
      }
    }
    for (long long int i = 0; i < n; i++) {
      if (i == last)
        cout << add << "\n";
      else if (s[i] == '#')
        cout << 1 << "\n";
    }
  }
  return 0;
}
