#include <bits/stdc++.h>
using namespace std;
vector<int> ans;
bool func() {
  bool check = false;
  for (int i = ans.size() - 1; i >= 0; i--)
    if (ans[i] > 1) {
      ans[i]--;
      return true;
    }
  return false;
}
int main() {
  char c = getchar();
  int r = -1, st = 0;
  while (c != '\n') {
    bool Do = true;
    if (c == '(') st++;
    if (c == ')') {
      if (st != 0)
        st--;
      else if (ans.size() == 0) {
        cout << -1;
        return 0;
      } else {
        if (!func()) {
          cout << -1;
          return 0;
        }
      }
    }
    if (c == '#') {
      r++;
      if (st == 0) {
        if (!func()) {
          cout << -1;
          return 0;
        } else
          ans.push_back(1);
      } else {
        Do = false;
        c = getchar();
        while (c == ')') {
          if (st != 0)
            st--;
          else if (!func()) {
            cout << -1;
            return 0;
          }
          c = getchar();
        }
        ans.push_back(0);
        if (st != 0) {
          ans[r] = st;
          st = 0;
        } else if (!func()) {
          cout << -1;
          return 0;
        } else
          ans[r] = 1;
      }
    }
    if (Do) c = getchar();
  }
  if (st != 0) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << endl;
  return 0;
}
