#include <bits/stdc++.h>
using namespace std;
#pragma warning(disable : 4996)
int t, i, n, tot, cnt, now;
char c[100001];
int main() {
  cin >> c;
  n = strlen(c);
  for (i = 0; i < n; i++) {
    if (c[i] == '(')
      tot++;
    else
      tot--;
    if (c[i] == '#') cnt++;
    if (tot < 0) {
      printf("-1");
      return 0;
    }
  }
  for (i = n - 1; i >= 0 && c[i] != '#'; i--) {
    if (c[i] == '(')
      now--;
    else
      now++;
    if (now < 0) {
      printf("-1");
      return 0;
    }
  }
  for (i = 1; i < cnt; i++) printf("1\n");
  printf("%d", 1 + tot);
  return 0;
}
