#include <bits/stdc++.h>
using namespace std;
int main() {
  string word;
  cin >> word;
  int open_count = 0, close_count = 0;
  int can_close = 0;
  for (int i = 0; i < word.length(); i++) {
    if (word[i] == '(') open_count++;
    if (word[i] == ')') close_count++;
    if (word[i] == '#') can_close++;
  }
  if (can_close > (open_count - close_count) || open_count == close_count)
    cout << -1 << endl;
  else {
    string new_word = "";
    vector<int> ans;
    int diff = open_count - close_count;
    for (int i = 0; i < word.length(); i++) {
      if (word[i] == '(') {
        new_word += '(';
      }
      if (word[i] == ')') {
        new_word += ')';
      }
      if (word[i] == '#') {
        if (can_close > 1) {
          ans.push_back(1);
          new_word += ')';
          diff--;
        } else {
          ans.push_back(diff);
          while (diff > 0) {
            new_word += ')';
            diff--;
          }
        }
        can_close--;
      }
    }
    open_count = 0;
    bool flag = false;
    for (int i = 0; i < new_word.length() && !flag; i++) {
      if (new_word[i] == '(') open_count++;
      if (new_word[i] == ')') open_count--;
      if (open_count < 0) flag = true;
    }
    if (open_count != 0 || flag)
      cout << -1 << endl;
    else {
      for (int i = 0; i < ans.size(); i++) {
        cout << ans[i] << endl;
      }
    }
  }
  return 0;
}
