#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const double pi = acos(-1.0);
const double eps = 1e-12;
int maxx, minn;
int maxi, mini;
int cases = 0;
void add(int &a, int &b) { a = (a + b) % mod; }
void mul(int &a, int &b) { a = (long long)a * (long long)b % mod; }
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  string a;
  int len;
  int i, j, k;
  int l, r;
  int nowl, nowr;
  int nowjing;
  int jing;
  while (cin >> a) {
    int flag = 0;
    l = r = jing = 0;
    nowl = nowr = 0;
    len = a.length();
    for (i = 0; i < len; i++) {
      if (a[i] == '#') jing++;
      if (a[i] == '(') l++;
      if (a[i] == ')') r++;
    }
    nowjing = jing;
    for (i = 0; i < len; i++) {
      if (a[i] == '(') nowl++;
      if (a[i] == ')') nowr++;
      if (a[i] == '#') {
        jing--;
        r++;
        nowr++;
        if (jing == 0) {
          nowr += max(l - r, 0);
        }
      }
      if (nowr > nowl) {
        flag = 1;
      }
    }
    if (flag)
      cout << "-1" << endl;
    else {
      for (i = 0; i < nowjing - 1; i++) {
        cout << 1 << endl;
      }
      cout << l - r + 1 << endl;
    }
  }
  return 0;
}
