#include <bits/stdc++.h>
using namespace std;
int hsh, cnt, indx;
char str[100005];
vector<int> v;
int main() {
  scanf("%s", str);
  for (int i = 0; str[i] != '\0'; ++i) {
    if (str[i] == '#') {
      if (cnt >= 1)
        v.push_back(1), --cnt;
      else
        exit(puts("-1"));
    } else if (str[i] == ')')
      --cnt;
    else
      ++cnt;
    if (cnt < 0) exit(puts("-1"));
  }
  v.back() = ++cnt;
  cnt = 0;
  for (int i = 0; str[i] != '\0'; ++i) {
    if (str[i] == '(')
      ++cnt;
    else if (str[i] == ')')
      --cnt;
    else
      cnt -= v[indx++];
    if (cnt < 0) exit(puts("-1"));
  }
  if (cnt > 0) exit(puts("-1"));
  for (int i = 0; i < v.size(); ++i) printf("%d\n", v[i]);
  return 0;
}
