#include <bits/stdc++.h>
using namespace std;
int a[100010];
string s;
int cnt;
int main() {
  cin >> s;
  cnt = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '(')
      cnt++;
    else if (s[i] == ')')
      cnt--;
  }
  int last = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '#') {
      a[i] = 1;
      cnt--;
      last = i;
    }
  }
  if (cnt >= 0)
    a[last] += cnt;
  else {
    cout << "-1";
    return 0;
  }
  bool ok = 1;
  cnt = 0;
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] == '(')
      cnt++;
    else if (s[i] == ')')
      cnt--;
    else if (s[i] == '#')
      cnt -= a[i];
    if (cnt < 0) ok = 0;
  }
  if (ok && cnt == 0) {
    for (int i = 0; i < s.length(); ++i)
      if (s[i] == '#') cout << a[i] << endl;
  } else
    cout << "-1";
  return 0;
}
