#include <bits/stdc++.h>
using namespace std;
long long dp[100020];
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  string s;
  cin >> s;
  long long sta = 0;
  long long la = -1;
  long long num = 0;
  for (long long i = 0; i < s.size(); i++) {
    if (s[i] == '(')
      sta++;
    else
      sta--;
    if (sta < 0) {
      cout << -1 << endl;
      return 0;
    }
    if (s[i] == '#') {
      la = i;
      num++;
    }
    dp[i] = sta;
  }
  for (long long i = la; i < s.size(); i++) {
    dp[i] -= sta;
    if (dp[i] < 0) {
      cout << -1 << endl;
      return 0;
    }
  }
  for (long long i = 0; i < num - 1; i++) cout << 1 << endl;
  cout << 1 + sta << endl;
  return 0;
}
