#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  size_t noOpen = 0, noClosed = 0, noHash = 0, lastPos = 0;
  for (size_t i = 0; i < s.size(); ++i) {
    if (s[i] == '(')
      ++noOpen;
    else if (s[i] == ')')
      ++noClosed;
    else {
      lastPos = i;
      ++noHash;
    }
    if (noClosed + noHash > noOpen) {
      cout << "-1\n";
      return 0;
    }
  }
  size_t toAddLast = noOpen - noClosed - noHash + 1;
  string p;
  for (size_t i = 0; i < s.size(); ++i) {
    if (s[i] != '#')
      p += s[i];
    else {
      if (i == lastPos) {
        for (size_t i = 0; i < toAddLast; ++i) p += ')';
      } else
        p += ')';
    }
  }
  noOpen = noClosed = 0;
  for (size_t i = 0; i < p.size(); ++i) {
    if (p[i] == '(')
      ++noOpen;
    else
      ++noClosed;
    if (noClosed > noOpen) {
      cout << "-1\n";
      return 0;
    }
  }
  if (noOpen != noClosed) {
    cout << "-1\n";
    return 0;
  }
  for (size_t i = 1; i < noHash; ++i) cout << "1\n";
  cout << toAddLast << '\n';
  return 0;
}
