#include <bits/stdc++.h>
using namespace std;
const int inf = 2e9;
const int MOD = 1e9 + 7;
const int N = 0;
string s;
void solve() {
  string p = s;
  int n = s.length();
  for (auto &i : p)
    if (i == '#') i = ')';
  int c = 0;
  for (auto &i : p) {
    if (i == '(')
      c++;
    else
      c--;
    if (c < 0) {
      printf("-1");
      return;
    }
  }
  c = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (s[i] == '#') break;
    if (s[i] == ')')
      c++;
    else
      c--;
    if (c < 0) {
      printf("-1");
      return;
    }
  }
  int c1 = 0, c2 = 0, c3 = 0;
  for (auto &i : s) {
    if (i == '(')
      c1++;
    else if (i == ')')
      c2++;
    else
      c3++;
  }
  vector<int> ans;
  int use = c1 - c2 - c3;
  for (int i = 1; i <= c3 - 1; i++) printf("1\n");
  printf("%d\n", use + 1);
}
int main() {
  cin >> s;
  solve();
}
