#include <bits/stdc++.h>
using namespace std;
int a[100001];
int main() {
  string s;
  long int sum = 0, count = 0, k = 0, l, last1 = 0, last2 = 0;
  cin >> s;
  if (s[s.size() - 1] == '(') {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '(')
      sum++;
    else if (s[i] == ')')
      sum--;
    else {
      a[k] = 1;
      sum--;
      k++;
      l = i;
    }
    if (sum < 0) {
      cout << -1;
      return 0;
    }
  }
  int i = l;
  for (i = l; i < s.size(); i++) {
    if (s[i] == '(')
      last1++;
    else if (s[i] == ')')
      last2++;
  }
  if (last1 > last2) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < k; i++) {
    if (i == k - 1)
      cout << sum + 1 << endl;
    else
      cout << a[i] << endl;
  }
  return 0;
}
