#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const double eps = 1e-8;
char ch[100010];
int main(void) {
  while (~scanf("%s", ch)) {
    int len = strlen(ch);
    int cnt1 = 0, cnt2 = 0, cnt = 0;
    int pos;
    for (int i = 0; i < len; i++) {
      if (ch[i] == '(') cnt1++;
      if (ch[i] == ')') cnt2++;
      if (ch[i] == '#') {
        cnt++;
        pos = i;
      }
    }
    if (cnt2 + cnt > cnt1) {
      printf("-1\n");
      continue;
    }
    int del = cnt1 - cnt2 - cnt;
    int tmp = del;
    bool f = 0;
    vector<int> vec;
    for (int i = len - 1; i >= 0; i--) {
      if (ch[i] == '(') cnt1--;
      if (ch[i] == ')') cnt2--;
      if (ch[i] == '#') {
        vec.push_back(1 + del);
        del = 0;
        if (cnt2 + 1 + del > cnt1) {
          f = 1;
        }
      }
      if (cnt2 > cnt1) {
        f = 1;
      }
    }
    cnt1 = cnt2 = cnt = 0;
    for (int i = 0; i < len; i++) {
      if (ch[i] == '(') cnt1++;
      if (ch[i] == ')') cnt2++;
      if (ch[i] == '#') {
        if (pos == i)
          cnt2 += tmp + 1;
        else
          cnt2++;
      }
      if (cnt2 > cnt1) f = 1;
    }
    if (f) {
      printf("-1\n");
      vec.clear();
    }
    for (int i = (int)vec.size() - 1; i >= 0; i--) {
      printf("%d\n", vec[i]);
    }
  }
  return 0;
}
