#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
const long long int inf = 2e9 + 5;
double PI = 3.14159265358979323846;
void solve() {
  string s;
  cin >> s;
  int open = 0, close = 0, hash = 0;
  int n = (int)s.length();
  int lastHash = -1;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      open++;
    else if (s[i] == ')')
      close++;
    else {
      lastHash = i;
      hash++;
    }
  }
  if (close + hash > open) {
    cout << -1 << "\n";
    return;
  }
  int hashNeed = open - close;
  int now = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      now++;
    else if (s[i] == ')')
      now--;
    else if (s[i] == '#' and i != lastHash) {
      now--;
      hashNeed--;
    } else if (s[i] == '#' and i == lastHash) {
      now -= hashNeed;
      hashNeed = 0;
    }
    if (now < 0) {
      cout << -1 << "\n";
      return;
    }
  }
  hashNeed = open - close;
  for (int i = 0; i < n; i++) {
    if (s[i] == '#' and i != lastHash) {
      cout << 1 << "\n";
      hashNeed--;
    } else if (s[i] == '#' and i == lastHash) {
      cout << hashNeed << "\n";
      hashNeed = 0;
    }
  }
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
