#include <bits/stdc++.h>
using namespace std;
string s;
vector<int> v;
int main() {
  cin >> s;
  int n = s.length();
  int cur = 0, pos = -1;
  for (int i = 0; i < n; i++)
    if (s[i] == '#') pos = i;
  for (int i = 0; i < n; i++) {
    cur += s[i] == '(' ? 1 : -1;
    if (cur < 0) return puts("-1");
  }
  int last = 1 + cur;
  cur = 0;
  for (int i = 0; i < n; i++) {
    cur += i == pos ? -last : (s[i] == '(' ? 1 : -1);
    if (cur < 0) return puts("-1");
  }
  for (int i = 0; i < n; i++) {
    if (s[i] == '#') {
      cout << ((i == pos) ? last : 1) << endl;
    }
  }
}
