#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, k, b, n, m, r = 0, x = 0, y = 0, z = 0, h = 0, l;
  string s;
  cin >> s;
  n = s.size();
  int a[n];
  for (i = 0; i < n; i++) {
    if (s[i] == '(')
      x++;
    else if (s[i] == ')' && x > 0)
      x--;
    else if (s[i] == ')')
      z = 1;
    else if (s[i] == '#' && x > 0) {
      a[y] = 1;
      y++;
      x--;
      k = i;
      l = x;
    } else if (s[i] == '#')
      z = 1;
  }
  x = l;
  if (y > 0) {
    r = 0;
    for (i = k + 1; i < n; i++) {
      if (s[i] == '(') {
        x++;
        r++;
      } else if (s[i] == ')' && x > 0)
        x--;
      else
        h = 1;
      if (s[i] == ')' && r > 0) r--;
    }
    a[y - 1] = x + 1;
  }
  if (z == 1 || h == 1 || r != 0)
    cout << "-1";
  else {
    for (i = 0; i < y; i++) {
      cout << a[i] << endl;
    }
  }
  return 0;
}
