#include <bits/stdc++.h>
using namespace std;
int main() {
  string t;
  long int i, j;
  cin >> t;
  long int c1 = 0, c2 = 0, c3 = 0;
  long int last;
  for (i = t.length() - 1; i >= 0; i--) {
    if (t[i] == '#') {
      last = i;
      break;
    }
  }
  long int f = 0, count = 0, g;
  if (t[t.length() - 1] == '(') {
    cout << "-1" << endl;
    return 0;
  }
  for (i = 0; i <= last; i++) {
    if (c1 < 0) {
      cout << "-1" << endl;
      f++;
      break;
    }
    if (t[i] == '(') {
      c1++;
    } else if (t[i] == ')') {
      c1--;
    } else if (t[i] == '#') {
      if (i == last) {
        c2 = c1;
        for (j = i + 1; j < t.length(); j++) {
          if (c2 < 0) {
            cout << "-1" << endl;
            f++;
            break;
          }
          if (t[j] == '(') {
            c3++;
            c2++;
          } else if (t[j] == ')') {
            c3--;
            c2--;
          }
        }
        if (c3 > 0) {
          f++;
          cout << "-1" << endl;
          break;
        }
        if (f == 1) {
          break;
        }
        if (c2 == 0) {
          cout << "-1" << endl;
          f++;
          break;
        }
        g = c2;
        break;
      } else {
        count++;
        c1--;
      }
    }
  }
  if (f == 0) {
    while (count--) {
      cout << "1" << endl;
    }
    cout << g << endl;
  }
  return 0;
}
