#include <bits/stdc++.h>
using namespace std;
const int INF = 0x7fffffff;
const int MINF = 0x80000000;
const long long mod = 1000000007;
const int cons = 100001;
int main() {
  string str;
  cin >> str;
  int j = 0;
  int last = -1;
  int cnt = 0;
  int cnt2 = 0;
  for (int i = 0; i < str.length(); i++) {
    if (str[i] == '(') {
      last = 1;
      j++;
      cnt2++;
    } else if (str[i] == ')') {
      last = 2;
      j--;
      cnt2--;
    } else {
      last = 3;
      j--;
      cnt++;
      cnt2 = 0;
    }
    if (j < 0) {
      puts("-1");
      return 0;
    }
  }
  if (cnt2 > 0 || last == 1) {
    puts("-1");
    return 0;
  }
  for (int i = 0; i < cnt - 1; i++) {
    puts("1");
  }
  printf("%d\n", j + 1);
  return 0;
}
