#include <bits/stdc++.h>
using namespace std;
const int Maxn = 100010;
char s[Maxn];
vector<int> rep;
int main() {
  scanf("%s", s);
  int ls = strlen(s);
  int last;
  for (int i = 0; i < ls; i++)
    if (s[i] == '#') last = i;
  int cnt1 = 0, cnt2 = 0;
  for (int i = 0; i < last; i++) {
    if (s[i] == '(') {
      cnt1++;
    } else {
      cnt2++;
      if (s[i] == '#') rep.push_back(1);
      if (cnt2 > cnt1) {
        puts("-1");
        return 0;
      }
    }
  }
  int t1 = 0, t2 = 0;
  for (int i = ls - 1; i > last; i--)
    if (s[i] == '(')
      t1++;
    else
      t2++;
  int kk = cnt1 + t1 - cnt2 - t2;
  if (kk < 1) {
    puts("-1");
    return 0;
  }
  rep.push_back(kk);
  cnt2 += kk;
  if (cnt2 > cnt1) {
    puts("-1");
    return 0;
  }
  for (int i = last + 1; i < ls; i++) {
    if (s[i] == '(')
      cnt1++;
    else
      cnt2++;
    if (cnt2 > cnt1) {
      puts("-1");
      return 0;
    }
  }
  for (int i = 0; i < rep.size(); i++) printf("%d\n", rep[i]);
}
