#include <bits/stdc++.h>
using namespace std;
const double eps = 1e9;
char s[100010];
int kol = 0;
vector<int> a;
int s1, s2;
int r[100010];
int t[4 * 100010];
void build(int v, int tl, int tr) {
  if (tl == tr)
    t[v] = r[tl];
  else {
    int tm = (tl + tr) / 2;
    build(v * 2, tl, tm);
    build(v * 2 + 1, tm + 1, tr);
    t[v] = min(t[v * 2], t[v * 2 + 1]);
  }
}
int sum(int v, int tl, int tr, int l, int r) {
  if (l > r) return 1e8;
  if (l == tl && r == tr) return t[v];
  int tm = (tl + tr) / 2;
  return min(sum(v * 2, tl, tm, l, min(r, tm)),
             sum(v * 2 + 1, tm + 1, tr, max(l, tm + 1), r));
}
int main() {
  gets(s);
  int sz = strlen(s);
  for (int i = 0; i < sz; i++) {
    if (s[i] == '(') {
      kol++;
      s1++;
    } else if (s[i] == ')') {
      kol--;
      if (kol < 0) {
        cout << "-1";
        exit(0);
      }
      s2++;
    } else if (kol > 0) {
      a.push_back(1);
      kol--;
    } else {
      if (kol <= 0) {
        cout << "-1";
        exit(0);
      }
    }
    r[i] = kol;
  }
  if (a.size() == 0) {
    cout << "-1";
    return 0;
  }
  build(1, 0, sz - 1);
  int p = 0;
  int e = 0;
  int kol = r[sz - 1];
  for (int i = 0; i < sz; i++) {
    if (s[i] == '#') {
      int r = sum(1, 0, sz - 1, i, sz - 1);
      if (r - e > 0) {
        a[p] += r - e;
        kol -= r - e;
        e += (r - e);
      }
      p++;
    }
  }
  if (kol != 0) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < a.size(); i++) {
    printf("%d\n", a[i]);
  }
}
