#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
const int INF = 2e9;
const int MOD = 1e9 + 7;
int main() {
  vector<int> RES;
  string S = "";
  cin >> S;
  int N = S.size(), last = -1, depth = 0;
  for (int i = 0; i < N; i++) {
    if (S[i] == '(')
      depth++;
    else {
      if (S[i] == '#') last = i;
      depth--;
    }
    if (depth < 0) return printf("-1"), 0;
  }
  int val = depth;
  depth = 0;
  for (int i = 0; i < N; i++) {
    if (S[i] == '(')
      depth++;
    else {
      int removeIt = (i == last && S[i] == '#' ? val : 0) + 1;
      depth -= removeIt;
      if (S[i] == '#') RES.push_back(removeIt);
    }
    if (depth < 0) return printf("-1"), 0;
  }
  for (int i = 0; i < RES.size(); i++) printf("%i\n", RES[i]);
  return 0;
}
