#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)1e5 + 100;
char s[maxn];
int cnt[maxn];
int vis[maxn];
stack<int> S;
int main() {
  scanf("%s", s);
  int len = strlen(s);
  int ok = 1;
  for (int i = 0; i < len; i++) {
    if (s[i] == '(')
      S.push(i);
    else if (S.empty()) {
      ok = 0;
      break;
    } else {
      int u = S.top();
      S.pop();
      vis[u] = 1;
    }
    if (s[i] == '#') cnt[i]++;
  }
  int j;
  for (int i = 0; i < len; i = j + 1) {
    int tmp = 0;
    j = i;
    while (j < len && s[j] != '#') {
      tmp += !vis[j] && s[j] == '(';
      j++;
    }
    if (j == len && tmp) {
      ok = 0;
      break;
    }
    cnt[j] += tmp;
  }
  if (!ok)
    puts("-1");
  else
    for (int i = 0; i < len; i++)
      if (cnt[i]) printf("%d\n", cnt[i]);
  return 0;
}
