#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3fffffff;
const int SINF = 0x7fffffff;
const long long LINF = 0x3fffffffffffffff;
const long long SLINF = 0x7fffffffffffffff;
const int MAXN = 100007;
int n;
char s[MAXN];
int ka, ans[MAXN];
void init();
void input();
void work();
int main() {
  init();
  input();
  work();
}
void init() { ios::sync_with_stdio(false); }
void input() { scanf("%s", s + 1); }
void work() {
  n = strlen(s + 1);
  int cc = 0;
  for (int i = 1; i <= n; ++i) {
    if (s[i] == '(')
      ++cc;
    else {
      --cc;
      if (cc < 0) {
        printf("-1\n");
        return;
      }
      if (s[i] == '#') ans[++ka] = 1;
    }
  }
  ans[ka] += cc;
  int ia = 0;
  cc = 0;
  for (int i = 1; i <= n; ++i) {
    if (s[i] == '(')
      ++cc;
    else {
      if (s[i] == '#')
        cc -= ans[++ia];
      else
        --cc;
      if (cc < 0) {
        printf("-1\n");
        return;
      }
    }
  }
  for (int i = 1; i <= ka; ++i) printf("%d\n", ans[i]);
}
