#include <bits/stdc++.h>
template <class T>
T Max(T a, T b) {
  return a < b ? b : a;
}
template <class T>
T Min(T a, T b) {
  return a < b ? a : b;
}
template <class T>
T Max3(T a, T b, T c) {
  return Max(Max(a, b), c);
}
template <class T>
T Min3(T a, T b, T c) {
  return Min(Min(a, b), c);
}
template <class T>
void Swap(T& a, T& b) {
  T temp;
  temp = a;
  a = b;
  b = temp;
}
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  string s;
  cin >> s;
  int n = s.size();
  int a[n + 1];
  a[0] = 0;
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      a[i + 1] = a[i] + 1;
    else if (s[i] == ')')
      a[i + 1] = a[i] - 1;
    else {
      a[i + 1] = a[i];
      cnt++;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] < 0) {
      cout << "-1";
      return 0;
    }
  }
  if (a[n] < cnt)
    cout << "-1";
  else {
    int t = a[n];
    int t1 = t, cnt1 = cnt;
    string s1;
    for (int i = 0; i < s.size(); i++) {
      if (s[i] == '#') {
        if (cnt > 1) {
          s1 += ')';
          t--;
        } else {
          for (int i = 0; i < t; i++) s1 += ')';
        }
        cnt--;
      } else {
        s1 += s[i];
      }
    }
    int n1 = s1.size();
    int a1[n + 1];
    a1[0] = 0;
    for (int i = 0; i < n1; i++) {
      if (s1[i] == '(')
        a1[i + 1] = a1[i] + 1;
      else if (s1[i] == ')')
        a1[i + 1] = a1[i] - 1;
      else
        a1[i + 1] = a1[i];
    }
    for (int i = 1; i <= n1; i++) {
      if (a1[i] < 0) {
        cout << "-1";
        return 0;
      }
    }
    for (int i = 1; i < cnt1; i++) {
      cout << "1\n";
      t1--;
    }
    cout << t1;
  }
  return 0;
}
