#include <bits/stdc++.h>
using namespace std;
char s[100200];
int sum = 0, x = 0, d = 0;
int main() {
  cin >> s;
  for (int i = strlen(s) - 1; i >= 0; --i) {
    if (s[i] == '(') {
      x++;
    } else if (s[i] == ')') {
      x--;
    } else
      break;
    if (x > 0) {
      cout << -1;
      return 0;
    }
  }
  x = 0;
  for (int i = 0; i < strlen(s); ++i) {
    if (s[i] == '(') {
      x++;
    } else if (s[i] == ')') {
      x--;
    } else
      break;
    if (x < 0) {
      cout << -1;
      return 0;
    }
  }
  x = 0;
  for (int i = 0; i < strlen(s); ++i) {
    if (s[i] == '(') {
      sum++;
      x++;
    } else if (s[i] == ')') {
      sum--;
      x--;
    } else {
      if (sum <= 0) {
        cout << -1;
        return 0;
      } else {
        d++;
        sum--;
      }
    }
  }
  if (x <= 0) {
    cout << -1;
    return 0;
  }
  for (int i = 1; i < d; ++i) {
    cout << 1 << endl;
  }
  cout << sum + 1;
  return 0;
}
