#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i = 0, j = 0, flag = 0, hash[100002] = {0}, stack[100002] = {0},
         top = -1;
  string x;
  char item;
  getline(cin, x);
  n = x.length();
  for (i = 0; i < n; i++) {
    if (x[i] == '(') {
      stack[++top] = i;
    }
    if (x[i] == ')') {
      if (top < 0) {
        flag = 1;
        break;
      } else {
        item = stack[top];
        top--;
      }
    }
    if (x[i] == '#') {
      hash[j] = i;
      j++;
      if (top < 0) {
        flag = 1;
        break;
      }
    }
  }
  if (flag == 1 || stack[top] > hash[j - 1]) {
    cout << "-1";
    return 0;
  } else {
    for (i = 0; i < j - 1; i++) {
      hash[i] = 1;
      item = stack[top];
      top--;
    }
  }
  if (top < 0)
    cout << "-1";
  else {
    hash[i] = top + 1;
    for (i = 0; i < j; i++) {
      cout << hash[i] << endl;
    }
  }
  return 0;
}
