#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
void solve() {
  string s;
  cin >> s;
  long long n = s.size(), x = 0, y = 0, j, flag = 0, z = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '#') y++, j = i;
    if (s[i] == '(')
      x++;
    else
      x--;
    if (x < 0) {
      cout << -1 << '\n';
      return;
    }
  }
  for (long long i = j; i < n; i++) {
    if (s[i] == '(' && !flag) flag = 1;
    if (flag) {
      if (s[i] == '(')
        z++;
      else
        z--;
    }
  }
  if (z > 0) {
    cout << -1 << '\n';
    return;
  }
  for (long long i = 0; i < y - 1; i++) cout << 1 << '\n';
  cout << x + 1 << '\n';
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long TESTS = 1;
  while (TESTS--) {
    solve();
  }
  return 0;
}
