#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[100100];
  gets(a);
  int loop = strlen(a);
  int index = -1;
  int bam = 0, dan = 0, has = 0;
  for (int i = 0; i < loop; i++) {
    if (a[i] == '(')
      bam += 1;
    else if (a[i] == ')')
      dan += 1;
    else {
      has += 1;
      index = i;
    }
  }
  int need = bam - dan;
  int flag = 1;
  if (need < 0) {
    cout << -1;
  } else if (need < has) {
    cout << -1;
  } else {
    dan = 0;
    bam = 0;
    has = 0;
    int re[100100];
    int j = 0;
    for (int i = 0; i < loop; i++) {
      if (i == index) {
        re[j] = need;
        dan += need;
        j += 1;
        if (bam < dan) {
          cout << -1;
          flag = 0;
          break;
        }
      } else {
        if (a[i] == '(')
          bam += 1;
        else if (a[i] == ')')
          dan += 1;
        else {
          re[j] = 1;
          j += 1;
          need -= 1;
          dan += 1;
        }
        if (bam < dan) {
          cout << -1;
          flag = 0;
          break;
        }
      }
    }
    if (flag == 1) {
      for (int i = 0; i < j; i++) printf("%d\n", re[i]);
    }
  }
  return 0;
}
