#include <bits/stdc++.h>
using namespace std;
int main() {
  long long i, j, k, l, n, m, t;
  string a, b, c, d;
  cin >> a;
  int after = 0;
  int op, cl, ha;
  op = cl = ha = 0;
  int lst;
  for (i = 0; i < a.size(); i++) {
    if (a[i] == '(')
      op++;
    else if (a[i] == ')')
      cl++;
    else {
      ha++;
      lst = i;
    }
  }
  for (i = lst + 1; i < a.size(); i++) {
    if (a[i] == ')') after++;
  }
  int dif = op - cl;
  int flag = 0;
  int arr[100005];
  int si = 0;
  if (dif <= 0 || dif < ha)
    flag = 1;
  else {
    int op1, cl1;
    op1 = cl1 = 0;
    for (i = 0; i < a.size(); i++) {
      if (a[i] == '(') {
        op1++;
      } else if (a[i] == ')') {
        cl1++;
      } else {
        if (i != lst) {
          cl1++;
          arr[si++] = 1;
        } else {
          arr[si++] = op - cl1 - after;
          cl1 = op - after;
        }
      }
      if (cl1 > op1) flag = 1;
    }
    if (cl1 != op1) flag = 1;
  }
  if (flag)
    cout << "-1" << endl;
  else {
    for (i = 0; i < si; i++) cout << arr[i] << endl;
  }
  return 0;
}
