#include <bits/stdc++.h>
using namespace std;
char a[100010];
vector<int> v;
int main() {
  int t = 1, tc;
  int i, j, k, l, m, n;
  while (~scanf("%s", &a)) {
    v.clear();
    int prev = 0;
    l = strlen(a);
    for (i = 0; i < l && prev >= 0; i++) {
      if (a[i] == '(')
        prev++;
      else if (a[i] == ')')
        prev--;
      else if (a[i] == '#') {
        v.push_back(1);
        prev--;
      }
    }
    if (prev < 0) {
      printf("-1\n");
      continue;
    }
    if (prev > 0) v[v.size() - 1] += prev;
    prev = 0;
    j = 0;
    for (i = 0; i < l && prev >= 0; i++) {
      if (a[i] == '(')
        prev++;
      else if (a[i] == ')')
        prev--;
      else if (a[i] == '#') {
        prev -= v[j];
        j++;
      }
    }
    if (prev < 0) {
      printf("-1\n");
      continue;
    }
    for (i = 0; i < v.size(); i++) printf("%d\n", v[i]);
  }
  return 0;
}
