#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  while (cin >> s) {
    int sz = s.size();
    int a = 0;
    int num = 0, num2 = 0;
    int la = 0;
    bool f = 0;
    for (int i = 0; i < sz; ++i) {
      if (s[i] == '(') {
        a++;
        num++;
      } else {
        a--;
        if (s[i] == '#') {
          num2++;
          la = i + 1;
        }
        if (a < 0) f = 1;
      }
    }
    if (f) {
      cout << -1 << endl;
      continue;
    }
    int num3 = sz - num - num2;
    if (num != num3 && !num2) {
      cout << -1 << endl;
      continue;
    }
    a = 0;
    bool fuck = 0;
    int shit = 0;
    for (int i = la; i < sz; ++i) {
      if (s[i] == '(') {
        if (!fuck) fuck = 1, shit = i;
        a++;
      } else {
        a--;
      }
    }
    if (a > 0) {
      cout << -1 << endl;
      continue;
    }
    a = 0;
    f = 0;
    if (shit > la) {
      for (int i = shit; i < sz; ++i) {
        if (s[i] == '(') {
          a++;
        } else {
          a--;
        }
      }
    }
    if (a > 0) {
      cout << -1 << endl;
      continue;
    }
    for (int i = 0; i < num2 - 1; ++i) printf("1\n");
    cout << num - num2 - num3 + 1 << endl;
  }
}
