#include <bits/stdc++.h>
using namespace std;
string s;
int main() {
  cin >> s;
  int id = s.size() - 1;
  while (s[id] != '#') id--;
  int cnt = 0;
  int bn = 0;
  int ans = 1;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '(')
      cnt++;
    else if (s[i] == ')')
      cnt--;
    else {
      bn++;
      cnt--;
    }
    if (cnt < 0) {
      cout << "-1\n";
      return 0;
    }
  }
  ans += cnt;
  cnt = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '(')
      cnt++;
    else if (s[i] == ')')
      cnt--;
    else {
      if (i != id)
        cnt--;
      else
        cnt -= ans;
    }
    if (cnt < 0) {
      cout << "-1\n";
      return 0;
    }
  }
  for (int i = 1; i < bn; i++) {
    printf("1\n");
  }
  printf("%d\n", ans);
  return 0;
}
