#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:256000000")
int n, k;
vector<int> res;
string st;
int last;
int kol = 0;
int main() {
  cin >> st;
  int bal = 0;
  int flag = 0;
  int tbal = 0;
  for (int i = 0; i < st.size(); ++i) {
    if (bal < 0) {
      cout << -1;
      return 0;
    }
    if (st[i] == ')') {
      flag--;
      flag = max(0, flag);
      bal--;
    }
    if (st[i] == '(') {
      flag++;
      bal++;
    }
    if (st[i] == '#') {
      flag = 0;
      bal--;
      kol++;
    }
  }
  if (flag > 0) {
    cout << -1;
    return 0;
  }
  if (bal < 0) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < kol - 1; ++i) printf("1\n", 1);
  int t = bal + 1;
  printf("%d", t);
}
