#include <bits/stdc++.h>
using namespace std;
const int Nmax = 100005;
char s[Nmax];
int N, v[Nmax], ans[Nmax];
int st[Nmax], o[Nmax];
int main() {
  cin.getline(s + 1, Nmax);
  N = strlen(s + 1);
  int c = 0, f = 1;
  for (int i = 1; i <= N; i++)
    if (s[i] == '#') o[++o[0]] = i;
  o[++o[0]] = N + 1;
  for (int i = 1; i < o[1]; i++) {
    if (s[i] == '(') c++;
    if (s[i] == ')') c--;
    if (c < 0) {
      cout << "-1\n";
      return 0;
    }
  }
  for (int i = 1; i < o[0]; i++) {
    int get = 0x3f3f3f3f;
    for (int j = o[i]; j < o[i + 1]; j++) {
      if (s[j] == '(') c++;
      if (s[j] == ')') c--;
      get = ((get) < (c) ? (get) : (c));
    }
    v[++v[0]] = get;
    c--;
  }
  c = 0;
  for (int i = 1; i <= N; i++) {
    if (s[i] == '(') c++;
    if (s[i] == ')') c--;
    if (s[i] == '#') c--;
  }
  for (int i = 1; i <= v[0]; i++) ans[i] = 1;
  for (int i = 1; i <= v[0]; i++) {
    v[i]--;
    if (v[i] < 0) {
      cout << "-1\n";
      return 0;
    }
  }
  st[++st[0]] = v[0] + 1;
  v[v[0] + 1] = 0x3f3f3f3f;
  for (int i = v[0]; i >= 1; i--) {
    if (v[i] < v[st[st[0]]]) st[++st[0]] = i;
  }
  int sc = 0;
  for (int j = st[0]; j >= 2; j--) {
    int i = st[j];
    v[i] -= sc;
    if (c) {
      int coef = ((c) < (v[i]) ? (c) : (v[i]));
      c -= coef;
      v[i] -= coef;
      ans[i] += coef;
      sc += coef;
    }
  }
  if (c) {
    cout << "-1\n";
    return 0;
  }
  for (int i = 1; i <= v[0]; i++) cout << ans[i] << '\n';
  return 0;
}
