#include <bits/stdc++.h>
using namespace std;
string str;
int laz;
int pp;
int arr[100000];
int main() {
  while (cin >> str) {
    int ans = 0, temp = 0;
    bool flag = 0;
    for (int i = 0; i < str.length(); i++) {
      if (str[i] == ')')
        temp--;
      else if (str[i] == '(')
        temp++;
      if (temp < 0) {
        flag = 1;
        break;
      }
    }
    if (temp == 0) flag = 1;
    if (!flag) {
      laz = 0;
      if (str == "#")
        flag = 1;
      else {
        temp = 0;
        for (int i = 0; i < str.length(); i++) {
          if (str[i] == ')')
            temp--;
          else if (str[i] == '(')
            temp++;
          if (str[i] == '#') arr[laz++] = 1, temp--, pp = temp;
          if (temp < 0) {
            flag = 1;
            break;
          }
        }
      }
    }
    if (pp < temp || str[str.length() - 1] == '(') flag = 1;
    if (flag)
      puts("-1");
    else {
      for (int i = 0; i < laz - 1; i++) {
        cout << arr[i] << endl;
      }
      cout << temp + 1 << endl;
    }
  }
}
