#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  char s[100010];
  scanf("%s", s);
  int n = strlen(s);
  int a[100010];
  int e = n;
  for (int i = n - 1; i >= 0; i--)
    if (s[i] == '#') {
      e = i;
      break;
    }
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    if (s[i] == '#' && e != i) s[i] = ')', ans.push_back(1);
  }
  int sum = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      sum++;
    else if (s[i] == ')')
      sum--;
  }
  if (sum < 1) {
    puts("-1");
    return 0;
  }
  ans.push_back(sum);
  int cur = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      cur++;
    else if (s[i] == ')')
      cur--;
    else
      cur -= ans.back();
    if (cur < 0) {
      puts("-1");
      return 0;
    }
  }
  for (auto p : ans) cout << p << endl;
  return 0;
}
