#include <bits/stdc++.h>
using namespace std;
inline int read() {
  static int r, sign;
  static char c;
  r = 0, sign = 1;
  do c = getchar();
  while (c != '-' && (c < '0' || c > '9'));
  if (c == '-') sign = -1, c = getchar();
  while (c >= '0' && c <= '9') r = r * 10 + (int)(c - '0'), c = getchar();
  return sign * r;
}
template <typename T>
inline void print(T *a, int n) {
  for (int i = 1; i < n; ++i) cout << a[i] << " ";
  cout << a[n] << endl;
}
int n, a[100100 + 1], ans[100100 + 1];
char s[100100 + 1];
int main(int argc, char *argv[]) {
  scanf("%s", s);
  n = strlen(s);
  int cnt = 0;
  for (int i = 0; i < n; ++i)
    if (s[i] == '#') a[++cnt] = i;
  int cov = 0;
  bool ok = true;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '(')
      ++cov;
    else
      --cov;
    if (cov < 0) ok = false;
  }
  cov = 0;
  for (int i = n - 1; i >= 0; --i) {
    if (s[i] == ')')
      ++cov;
    else if (s[i] == '(') {
      if (cov == 0) {
        if (cnt > 0 && a[cnt] > i)
          ++ans[a[cnt]];
        else
          ok = false;
      } else
        --cov;
    } else if (s[i] == '#') {
      ++cov;
      if (cnt > 0 && a[cnt] > i) --cnt;
    }
  }
  if (ok) {
    for (int i = 0; i < n; ++i)
      if (s[i] == '#') printf("%d\n", ans[i] + 1);
  } else
    printf("-1\n");
  fclose(stdin);
  fclose(stdout);
  return 0;
}
