#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e7 + 13;
const int modn = 1e9 + 7;
string s;
long long int c1, c2, last, num, t;
bool check() {
  int x = 0, y = 0;
  for (int i = 0; i < t; i++) {
    if (s[i] == '(')
      x++;
    else
      x--;
    if (x < 0) return false;
  }
  if (x - last - 1 < 0) return false;
  x -= last + 1;
  for (int i = t + 1; i < s.length(); i++) {
    if (s[i] == '(')
      x++;
    else
      x--;
    if (x < 0) return false;
  }
  return 1;
}
int main(int argc, char *argv[]) {
  ios::sync_with_stdio(false);
  cin >> s;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '#' || s[i] == ')') {
      c1++;
    } else {
      c2++;
    }
    if (s[i] == '#') {
      t = i;
      num++;
    }
  }
  if (c1 > c2) {
    cout << "-1";
    return 0;
  }
  last = c2 - c1;
  if (check()) {
    for (int i = 0; i < num - 1; i++) {
      cout << 1 << endl;
    }
    cout << last + 1;
  } else {
    cout << -1;
  }
  return 0;
}
