#include <bits/stdc++.h>
using namespace std;
signed main() {
  string a;
  cin >> a;
  long long n = a.length();
  long long cnt = 0, x = 0;
  long long cnt2 = 0;
  for (long long i = 0; i < n; ++i) {
    if (a[i] == '#') {
      cnt++;
    } else if (a[i] == '(') {
      x++;
    } else {
      x--;
    }
    if (cnt > x) {
      cout << -1;
      return 0;
    }
  }
  for (long long i = n - 1; i >= 0; --i) {
    if (a[i] == '(')
      cnt2++;
    else if (a[i] == ')')
      cnt2--;
    else {
      break;
    }
    if (cnt2 > 0) {
      cout << -1;
      return 0;
    }
  }
  if (cnt2 > 0) {
    cout << -1;
    return 0;
  }
  for (long long i = 0; i < cnt - 1; ++i) {
    cout << 1 << "\n";
  }
  cout << x - cnt + 1;
}
