#include <bits/stdc++.h>
using namespace std;
int T[200000];
int liczba(char c) {
  if (c == '(')
    return 1;
  else if (c == ')')
    return -1;
  else
    return 2;
}
int od_lewej(int n) {
  int suma = 0;
  for (int i = 0; i < n; i++) {
    if (T[i] != 2)
      suma += T[i];
    else
      suma--;
    if (suma < 0) return -1;
  }
  return suma;
}
int ile_ha(int n) {
  int suma = 0;
  for (int i = 0; i < n; i++)
    if (T[i] == 2) suma++;
  return suma;
}
bool od_prawej(int n) {
  int suma = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (T[i] != 2)
      suma -= T[i];
    else
      return true;
    if (suma < 0) return false;
  }
  if (suma != 0) return false;
}
int main() {
  char c = 0;
  int n = 0;
  while (c != '(' && c != ')' && c != '#') c = getchar();
  do {
    T[n] = liczba(c);
    c = getchar();
    n++;
  } while (c == '(' || c == ')' || c == '#');
  int ost = od_lewej(n);
  if (ost == -1 || !od_prawej(n)) {
    printf("-1\n");
    return 0;
  }
  int ile = ile_ha(n);
  for (int i = 1; i < ile; i++) printf("1 ");
  printf("%d\n", ost + 1);
}
