#include <bits/stdc++.h>
using namespace std;
vector<int> pos;
map<int, int> save;
int main() {
  string str;
  bool flag;
  int fi, ex;
  while (cin >> str) {
    save.clear();
    pos.clear();
    fi = ex = 0;
    flag = true;
    for (int i = 0; i < str.size() && flag; i++) {
      if (str[i] == '(')
        fi++;
      else if (str[i] == '#') {
        ex = 0;
        pos.push_back(i);
        fi--;
        if (fi < 0) flag = false;
      } else {
        fi--;
        if (fi < 0) flag = false;
      }
    }
    if (fi >= 0) {
      save[pos[pos.size() - 1]] = fi;
      fi = 0;
      for (int i = str.size() - 1; i >= 0 && str[i] != '#'; i--) {
        if (str[i] == '(') {
          fi--;
          if (fi < 0) {
            flag = false;
            break;
          }
        } else
          fi++;
      }
    }
    if (flag) {
      for (int i = 0; i < str.size(); i++) {
        if (str[i] == '#') {
          if (save[i])
            cout << save[i] + 1 << endl;
          else
            cout << 1 << endl;
        }
      }
    } else
      printf("-1\n");
  }
  return 0;
}
