#include <bits/stdc++.h>
using namespace std;
template <class T>
void dbgarr(T *a, int s, int t) {
  for (int i = s; i <= t; i++) cerr << a[i] << ' ';
  cerr << endl;
}
char buf[200000];
int sum[200000];
vector<int> vec;
bool yes() {
  int p = -1;
  int n = strlen(&buf[1]);
  for (int i = 1; i <= n; i++) {
    if (buf[i] == '(') sum[i] = sum[i - 1] + 1;
    if (buf[i] == ')') sum[i] = sum[i - 1] - 1;
    if (buf[i] == '#') {
      sum[i] = sum[i - 1] - 1;
      p = i;
    }
    if (sum[i] < 0) return false;
  }
  vec.clear();
  int dt = sum[n];
  for (int i = 1; i <= n; i++) {
    if (i < p)
      if (buf[i] == '#') vec.push_back(1);
    if (i == p) {
      vec.push_back(1 + dt);
      sum[i] = sum[i] - dt;
    }
    if (i > p) {
      if (buf[i] == '(') sum[i] = sum[i - 1] + 1;
      if (buf[i] == ')') sum[i] = sum[i - 1] - 1;
    }
    if (sum[i] < 0) return false;
  }
  return true;
}
int main() {
  scanf("%s", &buf[1]);
  if (yes()) {
    int size = vec.size();
    for (int i = 0; i < size; i++) printf("%d\n", vec[i]);
  } else
    printf("-1\n");
}
