#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string str;
  cin >> str;
  int len = str.length();
  int cnt = 0, cnt2 = 0;
  bool flag = true;
  for (int i = 0; i < len; i++) {
    if (str[i] == '(') {
      cnt++;
    } else {
      cnt--;
      if (str[i] == '#') cnt2++;
    }
    if (cnt < 0) flag = false;
  }
  if (!flag)
    cout << -1 << endl;
  else {
    vector<int> ans;
    ans.clear();
    int tempcnt = cnt;
    cnt = 0;
    for (int i = 0; i < len; i++) {
      if (str[i] == '(')
        cnt++;
      else {
        cnt--;
        if (str[i] == '#') {
          ans.push_back(1);
          cnt2--;
          if (cnt2 == 0) {
            ans.pop_back();
            ans.push_back(tempcnt + 1);
            cnt -= tempcnt;
          }
        }
      }
      if (cnt < 0) flag = false;
    }
    if (!flag)
      cout << -1 << endl;
    else {
      for (int i = 0; i < ans.size(); i++) cout << ans[i] << endl;
    }
  }
  return 0;
}
