#(#(#((##((()))(((#)(#()#(((()()(()#(##(((()(((()))#(((((()(((((((()#((#((()(#(((()(()##(()(((()((#(
 (#((((()
 (#((
 ((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((#)((##
 (())((((#)
 (#(
 (#))(#(#)((((#(##((#(#((((#(##((((((#((()(()(())((()#((((#((()((((#(((((#(##)(##()((((()())(((((#(((
 ##((((((()
 #((#
 #))))
 (((((#(#(#(#()
 ((#(()#(##
 (((((((((((((((((((###################
 )((##((###
 (((()#(#)(
 ((#)(
 )(((())#
 ()((#((#(#()
 ((#(
 ()#(#())()()#)(#)()##)#((()#)((#)()#())((#((((((((#)()()(()()(((((#)#(#((((#((##()(##(((#(()(#((#))#

-1
 -1
 -1
 1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
 3
 -1
 -1
 -1
 -1
 -1
 1
1
1
5
 1
1
1
1
 1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
 -1
 -1
 -1
 -1
 1
1
3
 -1
 -1

#include <sstream>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <complex>
#include <cmath>
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <bitset>
#include <list>
#include <string.h>
#include <assert.h>
#include <time.h>

using namespace std;

#define SZ(x) ((int)x.size())
#define all(a) a.begin(),a.end()
#define allr(a) a.rbegin(),a.rend()
#define clrall(name,val) memset(name,(val),sizeof(name));
#define EPS 10e-9
#define ll long long
#define ull long long unsigned
#define SF scanf
#define PF printf
#define psb(b) push_back((b))
#define ppb() pop_back()
#define oo (1<<28)
#define mp make_pair
#define fs first
#define sc second
#define rep(var,s,n,it) for(var=(s);var<(n);(var)+=it)
#define rev(var,s,n,it) for(var=(n-1);var>(s-1);(var)-=it)
#define Read freopen("in.txt","r",stdin)
#define Write freopen("out.txt","w",stdout)
#define __ std::ios_base::sync_with_stdio (false)

#define casePrint PF("Case #%d: ",++cas);

int rr[100005];
int lr[100005];
int tl[100005];

int main()
{
    #ifdef rumman
//    Read;
//    Write;
    #endif // rumman
    string s;
    __;
    cin>>s;
    vector<int> res;
    int cntr=0,cnttr=0,cntl=0,cnth=0,tmp=0,flag=true;
    for(int i=0;i<SZ(s);i++)
    {
        if(s[i]=='(') cntr++;
        if(s[i]=='#') res.psb(1),tmp++;
        rr[i]=cntr;
    }
    for(int i=SZ(s)-1;i>-1;i--)
    {
        if(s[i]==')') cntl++;
        else if(s[i]=='#')
        {
            lr[i]=cntl;
            cntl=0;
        }
        else cntl=0;
    }
    for(int i=0;i<SZ(s);i++)
    {
        if(s[i]==')') cntl++;
        if(rr[i]<cntl)
        {
            flag=false;
        }
        tl[i]=cntl;
    }
    int Left=cntr-cntl-tmp;
    if(left<0)
    {
        cout<<-1<<"\n";
        return 0;
    }
//    cout<<Left<<" "<<cntr<<" "<<cntl<<" "<<tmp<<endl;
    for(int i=0,j=0;i<SZ(s);i++)
    {
        if(s[i]=='#')
        {
            int L=rr[i];
            int R=lr[i]+tl[i];
//            cout<<L<<" * "<<R<<endl;
            if(R+1<=L)
            {
                int cur=min(L-R-1,Left);
//                cout<<"cur : "<<cur<<endl;
                res[j]+=cur;
                j++;
                Left-=cur;
            }
            else
            {
                flag=false;
                break;
            }
        }
    }
    if(Left!=0) flag=false;
    if(flag)
    {
        for(int i=0;i<tmp;i++)
        {
            cout<<res[i]<<"\n";
        }
    }
    else cout<<"-1\n";
    return 0;
}
















