#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100100;
int n;
char s[MAXN];
vector<int> ans;
string str;
void read() { scanf("%s", &s); }
void solve() {
  n = strlen(s);
  int totalOpen = 0, totalClose = 0, totalSharp = 0;
  for (int i = 0; i < n; i++)
    if (s[i] == '(')
      totalOpen++;
    else if (s[i] == ')')
      totalClose++;
    else
      totalSharp++;
  if (totalClose + totalSharp > totalOpen) {
    cout << "-1\n";
    return;
  }
  int balance = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '(')
      balance++;
    else if (s[i] == ')') {
      balance--;
      if (balance < 0) {
        cout << "-1\n";
        return;
      }
    } else {
      if (balance == 0) {
        cout << "-1\n";
        return;
      }
      ans.push_back(1);
      balance--;
    }
  }
  ans[(int)ans.size() - 1] += balance;
  int index = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] != '#')
      str.push_back(s[i]);
    else {
      for (int j = 0; j < ans[index]; j++) str.push_back(')');
      index++;
    }
  }
  balance = 0;
  for (int i = 0; i < (int)str.size(); i++) {
    if (str[i] == '(')
      balance++;
    else
      balance--;
    if (balance < 0) {
      cout << "-1\n";
      return;
    }
  }
  for (int i = 0; i < (int)ans.size(); i++) printf("%d\n", ans[i]);
}
int main() {
  read();
  solve();
  return 0;
}
